Sunshine
Sunshine copied to clipboard
IPv6 not supported
Describe the Bug
Currently, IPv6 is not used by any of the network sockets.
If you run netstat -lnp | grep sunshine
, you can see all of the sockets bound to 0.0.0.0
, not [::]
. Also, if you look at https://github.com/SunshineStream/Sunshine/blob/master/sunshine/network.cpp, you can see it explicitly only binds with AF_INET.
On the server side, my ISP at puts me behind an IPv4 CGNAT, but has full end-to-end IPv6 connectivity.
And on the client side, both locations where I'd use it (either at work, or via my mobile) are also IPv6–only. (VPNs are not always feasible due to corp policy reasons.)
Expected Behavior
The Moonlight client supports IPv6. I expected to be able to connect to Sunshine using IPv6, but wasn't able to due to its lack of support.
Additional Context
No response
Sunshine Host Operating System and Version
Fedora 36
Architecture
x86_64
Sunshine Version
0.14.0
GPU Type
AMD
GPU Model
RX 6900XT
GPU Driver/Mesa Version
22.0.1
Capture Method (Linux Only)
Wayland
Just adding the same test on powershell:
Get-NetTCPConnection -State 'Listen' -OwningProcess (Get-Process -ProcessName 'sunshine').Id
LocalAddress LocalPort RemoteAddress RemotePort State AppliedSetting
------------ --------- ------------- ---------- ----- --------------
0.0.0.0 48010 0.0.0.0 0 Listen
0.0.0.0 47990 0.0.0.0 0 Listen
0.0.0.0 47989 0.0.0.0 0 Listen
0.0.0.0 47984 0.0.0.0 0 Listen
I need ipv6 too
@ReenigneArcher Any love for IPv6?
I don't have IPv6 so no way to test
It should be possible to test streaming from IPv6 localhost (::1
) if your network doesn’t have real IPv6 connectivity.
Yes, it should be possible to connect to localhost for testing. On Linux, listening on ::0
also listens on 0.0.0.0
AFAIK.
One use-case is to stream over a WireGuard or other VPN connection that uses IPv6 address to identify endpoints (IPv4 are possible too, but IPv6 provides much more freedom for addressing.
Here's a simple wireguard example with wg-quick. Put it in /etc/wireguard/connect.conf
, then activate with systemctl start wg-quick@connect
on both machines.
Server (note that wireguard doesn't have the concept of server or client, but here we take server as a computer whose endpoint we can specify with a static IP address):
I picked addresses from the fd00::/8
, which are for private use
[Interface]
Address = fd42:1234:5678::1/128
Privatekey = xxxx # output of wg genkey
ListenPort = 54321
[Peer]
AllowedIPs = fd42:1234:5678::2/128
PublicKey = yyyyPUB # output of echo yyyy | wg pubkey
Client:
[Interface]
Address = fd42:1234:5678::2/128
Privatekey = yyyy # output of another wg genkey
ListenPort = 11188
[Peer]
AllowedIPs = fd42:1234:5678::1/128
PublicKey = xxxxPUB # output of echo xxxx | wg pubkey
You don’t even need WireGuard. Just use IPv6 on your local network. Pick a /64 subnet under fc00::/7, and give addresses out of that subnet to your computers. You won’t get internet access, but it’s more than sufficient for testing and development.
Or just use link-local addresses, I agree. I was pointing out an easy way to test over the net.
As an aside, Wikipedia says that fc00::/8 has been reserved for future use, so I wouldn't use that, even though it's effectively unused.
You don’t even need WireGuard. Just use IPv6 on your local network. Pick a /64 subnet under fc00::/7, and give addresses out of that subnet to your computers. You won’t get internet access, but it’s more than sufficient for testing and development.
I also have this problem. Have you solved this problem
I need IPv6 too. I would be very grateful if Sunshine could support IPv6.