0

I'm creating a connection via the net module in my Node.js application:

this.stream = net.createConnection(25, host, this._onConnect);

Which works absolutely fine, however I need to send this traffic through Proximo because my connection requires a static IP. I'm not familiar with the net module, so any help would be beneficial.

James
  • 5,137
  • 5
  • 40
  • 80

1 Answers1

0

You shouldn't need to bind to anything or make any modifications to your code. As far as I know providing you've binded to the ip address that proximo gives you:

$ heroku addons:add proximo:development
Adding proximo to sharp-mountain-4005⦠done, v18 ($5/mo)
Your static IP address is 127.0.0.1

Your program will be wrapped in the proximo binary which routes all the TCP packets through the proxy. However you can limit the traffic with https://devcenter.heroku.com/articles/proximo#configuring-the-proximo-wrapper.

From my experience all the proximo setting up is on heroku's command line stuff.

rick
  • 416
  • 4
  • 12
  • Thanks, but I don't need my web worker to run through Proximo as it's also making requests elsewhere and this will have an effect on my costs. I only need my Proximo requests to be made by my worker script. – James Mar 15 '13 at 15:31
  • Oh, sorry, I also don't know what servers I'll be connecting to, it could be any, *but* I could send some of the requests, which I know require a static IP down Proximo, using the link you added, right? – James Mar 15 '13 at 15:32
  • You add proximo to individual apps, so not your web worker but your worker application. I think you're going to be stuck unless you know which traffic to which IPs need to go through the proxy. If it's HTTP traffic you could use the example provided. https://devcenter.heroku.com/articles/proximo#using-the-proximo-http-proxy. That means you'd be able to control where the traffic goes at runtime. – rick Mar 15 '13 at 15:41
  • I decided to run Proximo on my `web` dyno, and set `PROXIMO_MASK` to comma separated list of IPs that I know require a static IP to request. Unfortunately this makes my request route crash my Heroku instance, and I have no idea why, however your answer is how I should be doing it, so I'll mark it as correct. – James Mar 21 '13 at 12:16