zjael / simple-proxy-agent

Simple agent for sending HTTP and HTTPS traffic through HTTP and SOCKS proxies
MIT License
25 stars 5 forks source link

wrong socks5h handling #57

Open wenq1 opened 2 years ago

wenq1 commented 2 years ago
    let lookup = false;
    switch (this.proxy.protocol) {
      case 'socks4:':
      case 'socks5h:':      // this line is wrong,  should be 'socks5:' instead
        lookup = true;
        break;
    }

See https://github.com/urllib3/urllib3/issues/1035, Quote: In a proxy string, socks5h:// and socks4a:// mean that the hostname is resolved by the SOCKS server, not the client

wenq1 commented 2 years ago

Since you have already changed code, can you do a release?