TooTallNate / node-proxy-agent

Maps proxy protocols to `http.Agent` implementations
285 stars 69 forks source link

socks5 is not working #65

Closed Hodor228 closed 1 year ago

Hodor228 commented 3 years ago

What the problem with socks5? My code: const ProxyAgent = require('proxy-agent'); var proxyUri = 'socks5://login:pass@ip:port'; const httpsAgent = new ProxyAgent(proxyUri)

const cookieJar = new tough.CookieJar(); const request = axios.create({ httpsAgent, jar: cookieJar, withCredentials: true, });

I got an error: (node:11688) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version. (node:11688) UnhandledPromiseRejectionWarning: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: IP: 195.201.201.32 is not in the cert's list:

emubm1079002 commented 3 years ago

i got this error also. for temporary solution, you can manually change to "socks-proxy-agent" .

OpportunityLiu commented 2 years ago

Seems socks-proxy-agent@6.1.0 fixed this issue, but currently proxy-agent is using ^5.0.0

JijaProGamer commented 1 year ago

I know I'm late, but I've modified a bit of the code from this to add support for socks5 proxies.

Here is its github page: https://github.com/JijaProGamer/proxy-agent-v2

TooTallNate commented 1 year ago

This code in this repository has been moved to the proxy-agents monorepo, so I am closing this pull request. If you feel that this issue still exists as of the latest release, feel free to open a new issue over there.