Closed DemonMartin closed 1 year ago
I also get this error when trying to use IPRoyale's Socks5 proxies:
FetchError: request to https://discord.com/api/v9/gateway failed, reason: Hostname/IP does not match certificate's altnames: IP: 162.xxx.xxx.xxx is not in the cert's list:
what code did you run to get that error / how are you trying to implement the proxies?
Basically what I was doing, is trying to use socks5 proxies with auth, meaning I added
const client = new Client({ checkUpdate: true, proxy: "socks5://" + goodProxy, restRequestTimeout: 60 * 1000, interactionTimeout: 60 * 1000, restWsBridgeTimeout: 5 * 1000, captchaService: "2captcha", captchaKey: "xxxxxxxxxxxxxxxxxxxxxxx" });
goodProxy is just a "checker" for the proxy speed, since I'm using sticky proxies which last for 15 mins. My code only logs into the account for 1-3mins, so that shouldn't be a problem. The error appeared when executing client.login()
goodProxy returns something like this: name:password@geo.iproyal.com:port
you can use https-proxy-agent and it would look something like this
const HttpsProxyAgent = require('https-proxy-agent');
var agent = HttpsProxyAgent('proxyHere');
const client = new Client({ checkUpdate: true, http: { agent: agent }, restRequestTimeout: 60 * 1000, interactionTimeout: 60 * 1000, restWsBridgeTimeout: 5 * 1000, captchaService: "2captcha", captchaKey: "xxxxxxxxxxxxxxxxxxxxxxx" });
you just change the proxy argument to http.agent argument and in theory this should work
I don't have a good proxy to check :c
@aiko-chan-ai You could just buy some cheap proxy from for ex. iproyal (using coupon which gives ya 50% off) and test it :)
@aiko-chan-ai You could just buy some cheap proxy from for ex. iproyal (using coupon which gives ya 50% off) and test it :)
Or maybe you could buy a cheap socks5 proxy O_O
Which package is the feature request for?
The core library
Feature
Add some kind of support for http/s proxies with username & password because "proxy-agent" does not support that based on their docs.
Ideal solution or implementation
Maybe using https://www.npmjs.com/package/https-proxy-agent or something like that
Alternative solutions or implementations
No response
Other context
No response