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

IPv6 does not work in Windows TUN device #624

Open
cruse123 opened this issue Dec 16, 2024 · 0 comments
Open

IPv6 does not work in Windows TUN device #624

cruse123 opened this issue Dec 16, 2024 · 0 comments

Comments

@cruse123
Copy link

cruse123 commented Dec 16, 2024

IPv6 single stack or dual stack does not work in Windows TUN device.

Server side (linux amd64):

$ ./gost -V
gost v3.0.0-nightly.20241211 (go1.23.4 linux/amd64)

$ sudo ./gost -L=tun://:8421?net=fd::1/64
{"handler":"tun","kind":"service","level":"info","listener":"tun","msg":"listening on :8421/udp","service":"service-0","time":"2024-12-16T12:01:56.352+08:00"}
{"handler":"tun","kind":"listener","level":"info","listener":"tun","msg":"name: tun0, net: fd::1, mtu: 1350, addrs: [fd::1/64 fe80::e006:c7ef:64fb:7e38/64]","service":"service-0","time":"2024-12-16T12:01:56.356+08:00"}
{"handler":"tun","kind":"handler","level":"info","listener":"tun","local":":8421","msg":"fd::1 <> :8421","remote":"fd::1","service":"service-0","sid":"ctfqcd569hhbri3moong","time":"2024-12-16T12:01:56.357+08:00"}

Client side (windows amd64, with wintun 0.14.1):
With single IPv6 stack, the TUN device fails and retries indefinitely.

> gost -V
gost v3.0.0-nightly.20241211 (go1.23.4 windows/amd64)

> gost -L=tun://:0/192.168.xx.xx:8421?net=fd::2/64
{"handler":"tun","kind":"service","level":"info","listener":"tun","msg":"listening on :0/udp","service":"service-0","time":"2024-12-16T12:01:58.750+08:00"}
2024/12/16 12:01:59.037316 wintun.go:51: Using existing driver 0.14
2024/12/16 12:01:59.048721 wintun.go:51: Creating adapter
2024/12/16 12:01:59.966483 wintun.go:51: Removed orphaned adapter "wintun 1"
2024/12/16 12:02:00.262774 wintun.go:51: Failed to remove adapter when closing: The device instance does not exist in the hardware tree. (Code 0xE000020B)
{"handler":"tun","kind":"listener","level":"error","listener":"tun","msg":"netsh interface ip set address name=wintun source=static addr=fd::2 mask=255.255.255.255 gateway=none: exit status 1","service":"service-0","time":"2024-12-16T12:02:00.263+08:00"}
2024/12/16 12:02:00.371207 wintun.go:51: Removed orphaned adapter "wintun"

(indefinite loops...)

With v4+v6 dual stack (net=192.168.123.1/24,fd::1/64 for server, net=192.168.123.1/24,fd::2/64 for client), the client gost successfully starts, but IPv6 traffic is not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant