web-tunnel / lite-http-tunnel

Web tunnel tool to expose local HTTP server to internet
GNU General Public License v3.0
96 stars 30 forks source link

Error: connect ECONNREFUSED ::1:8080 #3

Closed glorinli closed 2 years ago

glorinli commented 2 years ago

Hi, I got the following error.

GET: / Error: connect ECONNREFUSED ::1:8080 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16) { errno: -61, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 8080 }

Platform: MacOS 10.15.7 Server: web.py (python3)

embbnux commented 2 years ago

It seems IPV6 issue. Your "localhost" is ipv6, but your local server bind in ipv4. You can try with:

$ lite-http-tunnel start 8080 --host 127.0.0.1

Or edit /etc/hosts to make localhost to ipv4

glorinli commented 2 years ago

Add --host 127.0.0.1 works!!!