gramjs icon indicating copy to clipboard operation
gramjs copied to clipboard

Can't connect via ipv6 proxy

Open polRk opened this issue 1 year ago • 0 comments

I have the proxy:

IPv6 :

  1. connection IP - 1.1.1.1 (example)
  2. username - hiden
  3. password - hiden
  4. IPv6 - ::1
const client = new TelegramClient(new StringSession(session), apiId, apiHash, {
  useWSS: false,
  useIPV6: true,
  connectionRetries: 3,
  proxy: {
    ip: "1.1.1.1", 
    port: 1111, 
    username: hidden, 
    password: hidden, 
    socksType: 5
  },
})

await client.connect()

Socks5 proxy rejected connection - ConnectionRefused

error: Socks5 proxy rejected connection - ConnectionRefused
      at new SocksClientError (/node_modules/socks/build/common/util.js:9:9)
      at closeSocket (/node_modules/socks/build/client/socksclient.js:390:32)
      at handleSocks5FinalHandshakeResponse (/node_modules/socks/build/client/socksclient.js:638:13)
      at processData (/node_modules/socks/build/client/socksclient.js:334:17)
      at onDataReceivedHandler (/node_modules/socks/build/client/socksclient.js:307:9)
      at addChunk (node:stream:1935:43)
      at readableAddChunk (node:stream:1889:59)
      at data (node:net:52:17)

polRk avatar Jun 01 '24 21:06 polRk