Closed SMunroe69 closed 10 months ago
Good question. Will have to check if I could detect the difference in the code.
Is there any particular reason for using the temporary address over the other one?
My DDNS updates to its provider using the temporary IPv6 address. If I could get the Plex updater to match the IP address that my DDNS service uses, then I should be able to access my Plex library outside my local network. Hopefully.
Looks like these I am not able to detect any difference between these two addresses using the Go library.
Few questions:
ip a
instead of ifconfig
(masking IPs ofc)?ip
isn't standard in macOS.ifconfig
command, the addresses are always listed as secured first, then temporary.Regarding 5.: I was considering adding a command line flag like -use-address
which could be first
, last
or all
. First/last only add a custom access URL for the first/last IPv6 address on the interface. All would add one custom access URL per IPv6 address found on the interface.
Going by the answers to the other questions, I recon either -use-address last
or -use-address all
could work for your scenario?
That command could work, I think. When I run ifconfig
, it lists the temporary IPv6 address first, then the permanent. Maybe instead of -use-address all
it could be -use-address any
for those that don't need to define one specifically. I'm not sure where the use case would call for -use-address all
.
Just for info, when I visit ip6only.me, the IP returned is always the "temporary" IP.
Thank you for your help here!
The default would be first
, which is what it's currently doing: Use the first usable IPv6 address it finds on the given interface. any
would work just as well, but it's a little less indicative of the actual behavior of the tool.
all
would put the work on the client. Plex tries all possible ways of connecting to a server. So if you have multiple custom access URLs, it will use whichever works. Meaning by just blindly adding IPv6 custom access URLs for every IPv6 address on an interface, the Plex client would just have more options to try. Could be useful if you don't really know which IPv6 address to use and/or if the addresses are not always in the same order.
Regarding the ip6only.me hint: I looked into how go internally selects the local address to use. Turns out there's an RFC for it. I need to look into it a bit further, but for now I'll add the three options as mentioned above.
When I run an ifconfig, I have the following:
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether 20:a5:cb:d1:b4:7f inet6 xxxx::xxx:xxxx:xxxx:42b2%en1 prefixlen 64 secured scopeid 0x12 inet 192.168.178.32 netmask 0xffffff00 broadcast 192.168.178.255 inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:a28a:683c prefixlen 64 autoconf secured inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:f523:d9cf prefixlen 64 autoconf temporary nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active
My DDNS uses the temporary all the time, and this tool will use the secured (more permanent address). Would it be possible to add an option to select the temporary IPv6 over the secured?