refs #1508 Fix socks5 proxy hostname for new version of proxy agent

This commit is contained in:
AkiraFukushima 2022-12-21 01:41:42 +09:00
parent 4e00790d78
commit 7f1574dd18
No known key found for this signature in database
GPG key ID: B6E51BAC4DE1A957
3 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@
"author": "Akira Fukushima <h3.poteto@gmail.com> (https://github.com/h3poteto)",
"license": "MIT",
"dependencies": {
"megalodon": "5.0.1"
"megalodon": "*"
},
"devDependencies": {
"assert": "^2.0.0",

View file

@ -8,7 +8,7 @@
"author": "h3poteto",
"license": "MIT",
"dependencies": {
"megalodon": "5.0.1",
"megalodon": "*",
"typescript": "4.9.4"
},
"devDependencies": {

View file

@ -47,7 +47,7 @@ const proxyAgent = (proxyConfig: ProxyConfig): HttpsProxyAgent | SocksProxyAgent
case 'socks4a': {
let options: SocksProxyAgentOptions = {
type: 4,
host: proxyConfig.host,
hostname: proxyConfig.host,
port: proxyConfig.port
}
if (proxyConfig.auth) {
@ -64,7 +64,7 @@ const proxyAgent = (proxyConfig: ProxyConfig): HttpsProxyAgent | SocksProxyAgent
case 'socks': {
let options: SocksProxyAgentOptions = {
type: 5,
host: proxyConfig.host,
hostname: proxyConfig.host,
port: proxyConfig.port
}
if (proxyConfig.auth) {