database64128 / swgp-go

🐉 Simple WireGuard proxy with minimal overhead for WireGuard traffic.
GNU Affero General Public License v3.0
224 stars 23 forks source link

Forwarding issue on windows #31

Closed edthepurple closed 11 months ago

edthepurple commented 1 year ago

Hello and thanks for your amazing product.

I was able to use it without a problem between two linux (ubuntu 22) instances. but when I try to forward a port from my windows client to my linux servers I encountered a problem.

the port gets successfully forwarded, meaning that I am able to connect to it but no traffic gets forwarded.

here's my client conf.json: (assuming the linux target server is xx.xx.xx.xx)

{
    "clients": [
        {
            "name": "client",
            "wgListen": "192.168.19.92:8443",
            "wgFwmark": 0,
            "proxyEndpoint": "xx.xx.xx.xx:8444",
            "proxyMode": "zero-overhead",
            "proxyPSK": "sAe5RvzLJ3Q0Ll88QRM1N01dYk83Q4y0rXMP1i4rDmI=",
            "proxyFwmark": 0,
            "mtu": 1280
        }
    ]
}

and here's my server conf.json:

{
    "servers": [
        {
            "name": "server",
            "proxyListen": "0.0.0.0:8444",
            "proxyMode": "zero-overhead",
            "proxyPSK": "sAe5RvzLJ3Q0Ll88QRM1N01dYk83Q4y0rXMP1i4rDmI=",
            "proxyFwmark": 0,
            "wgEndpoint": "127.0.0.1:8443",
            "wgFwmark": 0,
            "mtu": 1500
        }
    ]
}

is there something else to do on windows to make it work? some firewall rules, adding routes manually or enable forwarding?

database64128 commented 1 year ago

When you said "forward a port", did you mean forwarding WireGuard traffic, or just some other arbitrary UDP traffic?

If you are using wireguard-windows with the default routes, depending on your configuration, you might need to disable the "kill-switch" and add a separate route to your swgp-go server via the original physical gateway (i.e. your home router).