erebe / wstunnel

Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI - Static binary available
Other
3.17k stars 287 forks source link

Client does not connect to server [Wireguard instructions] #237

Closed g0djira closed 1 month ago

g0djira commented 2 months ago

Describe the bug As described in [Wireguard and wstunnel] section I've started

And that's all, I can't see in logs that client is trying to connect to server and exchange certificates.

To Reproduce

  1. Start server with given parameters.
  2. Start client with given parameters.

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context wstunnel works as expected in example "Simplest one"

erebe commented 2 months ago

Hello,

Most likely, you misconfigured your WireGuard client configuration. Be sure, the endpoint point to localhost, and to start wireguard after wstunnel is started.

g0djira commented 2 months ago

Hello, and thank you for your project!

Isn't Wstunnel supposed to establish connection and handshake even without Wireguard started? Here's my client's wg0.conf:

[Interface]
Address = 172.16.0.2/32
PrivateKey = UM=
DNS = 1.1.1.1

[Peer]
PublicKey = lE=
AllowedIPs = 0.0.0.0/0
Endpoint = localhost:51510
PersistentKeepalive = 20
g0djira commented 1 month ago

Fixed by changing localhost to 127.0.0.1 in [Peer] section, client's wg config. O_o

erebe commented 1 month ago

Perfect then, i assume localhost in your /etc/hosts is set properly ? Or resolve to an ip6 address