aleixrodriala / wa-tunnel

Tunneling Internet traffic over Whatsapp
MIT License
2.08k stars 96 forks source link

ERROR Client! ERROR (3836): connect ECONNREFUSED ::1:3128 "errno": -4078, #17

Closed Vintic closed 1 year ago

Vintic commented 1 year ago

Could you please help me?

Steps to reproduce:

  1. Execute: node src/server.js localhost 3128 PHONE_1
  2. Enter Whatsapp on PHONE_2 and scan QR code from POINT 1 (register it as server).
  3. Execute: node src/client.js 8080 PHONE_2
  4. Enter Whatsapp on PHONE_1 and scan QR code from POINT 3 (register it as client).
  5. Execute curl -v -x localhost:8080 https://httpbin.org/ip

Server log:

[16:12:15.681] INFO (3836): connection update {"connection":"connecting","receivedPendingNotifications":false}
[16:12:17.209] INFO (3836): connection update {"connection":"open"}
[16:12:17.267] INFO (3836): connection update {"receivedPendingNotifications":true}
[16:14:37.851] INFO (3836): RECIEVING [1] -> 58943
[16:14:37.852] INFO (3836): PROCESSING [1] -> 58943
[16:14:37.854] INFO (3836): RECIEVING [1] MESSAGES -> 58943
[16:14:37.855] INFO (3836): Socket NOT In list -> 58943
[16:14:37.856] INFO (3836): CHECKING BUFFER [1] -> 58943
[16:14:37.857] ERROR (3836): ERROR Client!
[16:14:37.858] ERROR (3836): connect ECONNREFUSED ::1:3128
    err: {
      "type": "Error",
      "message": "connect ECONNREFUSED ::1:3128",
      "stack":
          Error: connect ECONNREFUSED ::1:3128
              at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
      "errno": -4078,
      "code": "ECONNREFUSED",
      "syscall": "connect",
      "address": "::1",
      "port": 3128
    }

Client log:

[16:13:49.945] INFO (33176): connection update {"connection":"connecting","receivedPendingNotifications":false}
[16:13:49.953] INFO (33176): TCP Server is running on port 8080.
[16:13:51.520] INFO (33176): connection update {"connection":"open"}
[16:13:51.649] INFO (33176): connection update {"receivedPendingNotifications":true}
[16:14:36.762] INFO (33176): CONNECTED -> 58943
[16:14:36.763] INFO (33176): ACTIVE SOCKETS -> 58943
[16:14:36.764] INFO (33176): SENDING [0][1/1][276] -> 58943

Tried differnet methods: Windows 11 as Client and server same time Android as Client and server same time Windows 11 as Client and Android as server Android as Client and Windows 11 as server

aleixrodriala commented 1 year ago

Are you running Squid on port 3128 in the server?

Vintic commented 1 year ago

I run wa-tunnel server on port 3128, and client on port 8080, I don't have any other server running. I also tried to use different ports: 8081, 443 I also tried it on Mac OS, same result.

aleixrodriala commented 1 year ago

Yes, you should be running something on port 3128 like a proxy server, if not you can try running on mac the server as port 22 and then you can ssh into it.