Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-L only binds to IPv4 127.0.0.1, not IPv6 ::1 #411

Closed
ygoe opened this issue Feb 11, 2025 · 1 comment
Closed

-L only binds to IPv4 127.0.0.1, not IPv6 ::1 #411

ygoe opened this issue Feb 11, 2025 · 1 comment

Comments

@ygoe
Copy link

ygoe commented Feb 11, 2025

(ノಠ益ಠ)ノ彡┻━┻

==> Read and try the examples first before requesting help <==

https://github.com/erebe/wstunnel?#examples

If you have trouble with wireguard https://github.com/erebe/wstunnel?#wireguard-and-wstunnel-

If wstunnel cannot connect to server while wireguard is on,
be sure you have added a static route via your main gateway for the ip of wstunnel server.
Else if you forward all the traffic without putting a static route,
you will endup looping your traffic wireguard interface -> wstunnel client -> wireguard interface
If you have trouble making it works on windows, please check this issue #252

(ノಠ益ಠ)ノ彡┻━┻

Describe the goal

A clear and concise description of what you try to achieve.
Describe if you are behind a proxy, if you use some kind relay, what protocol/app you want to forward

Describe what does not work

A clear and concise description of why you can't reach your goal.

Describe your wstunnel setup

Paste your logs of wstunnel, started with --log-lvl=DEBUG, and with the command line used

  • client
  • server

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

I'm trying out wstunnel with a simple netcat TCP server. Outside the ws tunnel on the local side I connect to "localhost". Netcat seems to resolve this as ::1 first but fails to connect. Then after a short delay it connects to 127.0.0.1 and then it works.

A quick check shows that wstunnel is only listening on 127.0.0.1 but not on ::1. Can this be changed? I only have the -L argument, no address for localhost.
Describe your wstunnel setup

client: wstunnel client -L tcp://9999:127.0.0.1:2345 wss://myhostname:443
server: doesn't matter

Desktop (please complete the following information):

OS: Windows 11

I'm using the latest release wstunnel 10.1.9.

@erebe
Copy link
Owner

erebe commented Feb 12, 2025

Hello,

By default it is 127.0.0.1, but you can select the bind address you want to use

 -L, --local-to-remote <{tcp,udp,socks5,stdio,unix}://[BIND:]PORT:HOST:PORT>

in your case

-L 'tcp://[::1]:9999:127.0.0.1:2345' 
or 
-L 'tcp://0.0.0.0:9999:127.0.0.1:2345'
or 
-L 'tcp://[::]:9999:127.0.0.1:2345'
or 
-L 'tcp://192.168.1.1:9999:127.0.0.1:2345'

@erebe erebe closed this as completed Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants