Can't request via localAdress and proxy simultaneously
See original GitHub issueSummary
I have many interfaces on server, need to make requests via them and also using proxy, because proxy server has request limit per IP. Linux’s curl works fine, but I can’t make request via ‘request’
Simplest Example to Reproduce
request.get('https://api.ipify.org?format=json', {
json: true,
timeout: 4000
}, (error, response, body) => {
console.log('1:', body)
})
request.get('https://api.ipify.org?format=json', {
json: true,
localAddress: 'my second local IP',
timeout: 4000
}, (error, response, body) => {
console.log('2:', body)
})
request.get('https://api.ipify.org?format=json', {
json: true,
proxy: 'proxy IP',
timeout: 4000
}, (error, response, body) => {
console.log('3:', body)
})
request.get('https://api.ipify.org?format=json', {
json: true,
localAddress: 'my second local IP',
proxy: 'proxy IP',
timeout: 4000
}, (error, response, body) => {
console.log('4:', body)
})
Expected Behavior
My main IP is banned, so I expect to see logs from 1, 2 and 4. But I get only from 1 and 2. 4th don’t work, because localAdress is not applied.
curl --interface ‘second interface’ -x ‘proxy IP’ website This works fine
software | version |
---|---|
request | 2.85.0 |
node | 9.2.0 |
npm | 5.8.0 |
Operating System | Ubuntu 14.04.5 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Proxy ARP – Definition and Use Cases - Practical Networking
Proxy ARP occurs when one node is responding to an ARP request on ... ARP Request does not know whether the response will...
Read more >chimurai/http-proxy-middleware: The one-liner node ... - GitHub
In Express, this is the path relative to the mount-point of the proxy. path matching. createProxyMiddleware({...}) - matches any path, all requests will...
Read more >This site can't be reached: how to solve - SupportHost
On Windows 10, just type 'proxy' in the search bar and open the proxy settings panel.
Read more >PC Client can't connect to Internet - WinGate Forums • View topic
Have you tried to see if a proxy OR NAT connection works? ... and server's screens at the same time and work with...
Read more >How To Configure Nginx as a Web Server and Reverse Proxy ...
In this tutorial you'll configure Nginx as both a web server and as a reverse proxy for Apache to host four domains on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As this code is not extendible on client side I think that there is no soft variant (without maintainers intervention) of warkaround, other that paypass custom http.Agent to options (for example http-proxy-agent)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.