function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jim AmsterJim Amster 

How do I access salesforce from behind a proxy using node-salesforce?

I need help specifying the proxy in the code below.

var _this = this;
  this.sfConn = new sf.Connection({
    loginUrl: 'https://login.salesforce.com'
  });
  console.log('About to log into salesforce');
  this.sfConn.login(username, password, function(error, userInfo) {
    if (error) { return console.log(error); }
    _this.userInfo = userInfo;
    callback(error, userInfo);
  });
Francis Gerard AlcalaFrancis Gerard Alcala
You must be able to specify your proxy server and port.
If the code is in java, you can do this by these sample codes:
 
System.setProperty("https.proxyHost", "proxysite.com");
System.setProperty("https.proxyPort", "8080");

Also do these for http,ftp, and socks protocols if you would be using these.