+ 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.