Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Only those in LAN may access Web UI ipv6 support

Open axet opened this issue 2 years ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your issue described in the documentation?

  • [X] I have read the documentation

Is your issue present in the nightly release?

  • [X] This issue is present in the nightly release

Describe the Bug

Config option "Only those in LAN may access Web UI" working incorrectly. Current implementation only only check IPv4 for unroutable address. But here is also IPv6 with unrotable (local link) addresses. You can see all unroutable addresses in wikipeida:

  • https://ru.wikipedia.org/wiki/IPv4
  • https://ru.wikipedia.org/wiki/IPv6

Expected Behavior

No response

Additional Context

No response

Host Operating System

Linux

Operating System Version

bookworm

Architecture

64 bit

Sunshine commit or version

0.21.0

Package

Linux - flatpak

GPU Type

AMD

GPU Model

rx 6600

GPU Driver/Mesa Version

0000

Capture Method (Linux Only)

No response

Config

000

Apps

No response

Relevant log output

000

axet avatar Oct 23 '23 16:10 axet

Yes, this is a known limitation of our IPv6 support. We do not currently have any method of enumerating interfaces and addresses in our platform-specific backends, so we can't tell if a given address is on-link or not.

cgutman avatar Oct 28 '23 00:10 cgutman

No need for that. Listening 0.0.0.0 - makes you ipv4 only. Listening :: makes you ipv4/ipv6. You have peer address which can be validated for local node connection / remote connection.

axet avatar Oct 28 '23 04:10 axet

I don't understand what you're suggesting. Yes, we can listen on 0.0.0.0 or :: and that's exactly what we already do depending on whether you selected IPv4-only or IPv6+IPv4 in Sunshine's configuration.

As I mentioned, we need to know whether the peer address is on-link or not. Unlike IPv4, you can't easily know that based on the address alone. You need to enumerate the assigned addresses and subnet masks on local interfaces to determine on-link destinations, and that isn't implemented yet.

cgutman avatar Oct 30 '23 06:10 cgutman

Not true. Unless you also want to add routable local IPv6 addresses, which BTW I do not recommend. IPv6 not a bit different from IPv4.

  • https://wikipedia.org/wiki/IPv4
  • https://wikipedia.org/wiki/IPv6

Check unroutable addesses (local link)

axet avatar Oct 30 '23 07:10 axet

It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!

LizardByte-bot avatar Jan 29 '24 10:01 LizardByte-bot