You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is also running over localhost. I investigated a bit further, and looking at which options are coming into socks5-http-client/lib/Agent, the first one is
I had a similar problem. I was having trouble changing the ports in consecutive requests. I solved it by passing a new instance of Agent class to the agent property instead of passing agentClass and agentOptions separately.
const Agent = require('socks5-http-client/lib/Agent');
const request = require('request');
request({
url: 'http://whatismyipaddress.com',
agent: new Agent({
socksHost: 'localhost',
socksPort: 9050
})
}, (err, res, body) => {
// do something with the response
})
Hey, I tried to use the Agent in combination with request and changing tor proxy hostnames. One Tor is running on localhost, the other on 'tor_proxy'.
works as expected, the request is running over the localhost tor. The second request however
Is also running over localhost. I investigated a bit further, and looking at which options are coming into socks5-http-client/lib/Agent, the first one is
and the second one
Seems like request is caching the agent if it used one before and so not changing the proxy hostname.
The text was updated successfully, but these errors were encountered: