Skip to content
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

Error when making a request through socks proxies #35

Open
Tenclea opened this issue Apr 4, 2021 · 0 comments
Open

Error when making a request through socks proxies #35

Tenclea opened this issue Apr 4, 2021 · 0 comments

Comments

@Tenclea
Copy link

Tenclea commented Apr 4, 2021

I keep getting the following error when making requests through socks proxies :
SocksClientError: An invalid destination host was provided.

My request looks like this :

const ProxyAgent = require('simple-proxy-agent');
// p is a proxy that looks like 'socks://79.xxx.xx.xxx:4153'
const res = await needle('get', 'https://google.com', {
    agent: new ProxyAgent(p),
    follow: 10,
    response_timeout: 10000,
    read_timeout: 5000,
}).catch(e => e);

Any ideas on why this could be happening ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant