-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which http-proxy-agent
package do you use?
#123
Comments
Hi! I was using |
Is the proxy working for you? I use the same code. But it seems like the lib is not using the proxy ip, it's using my local ip. |
Yes, works for me. Could you try this?
|
Interesting. Could you try this snippet to check HttpProxyAgent in isolation?: import { HttpProxyAgent } from 'http-proxy-agent';
import fetch from 'node-fetch';
main();
async function main() {
console.log('without proxy');
const res1 = await fetch('https://www.httpbin.org/ip');
console.log(await res1.text());
console.log('with proxy');
const agent = new HttpProxyAgent(`http://133.18.234.13:80`); // maybe proxy needs to be replaced with fresher one
const res2 = await fetch('https://www.httpbin.org/ip', { agent });
console.log(await res2.text());
} My output is:
|
also meet this problem. |
Привет, I could not find
createHttpProxyAgent
in the package. Which lib are you using?I am using
HttpProxyAgent
for now. But the generated agent seems not working with your lib. Your lib is using an old agent somehow.The text was updated successfully, but these errors were encountered: