matthuisman / slyguy.addons

Github mirror of SlyGuy add-ons
https://www.matthuisman.nz/2020/02/slyguy-kodi-repository.html
275 stars 75 forks source link

SlyProxy: Proxy IPv6 support #795

Closed tiagogaspar8 closed 1 month ago

tiagogaspar8 commented 1 month ago

Hi all,

I have noticed (specially when using Disney +) that when SlyProxy is enabled, all connections are made to IPv4 instead of IPv6 when available. Is this something that can be fixed? or at least added an option in settings to prefer IPv6?

Thanks!

matthuisman commented 1 month ago

yes, itll because i have some prefer ivp4 code here: https://github.com/matthuisman/slyguy.addons/blob/master/script.module.slyguy/resources/modules/slyguy/session.py#L180

I can add a setting to disable that

Curious to why you prefer ipv6?

tiagogaspar8 commented 1 month ago

I would say, in my humble opinion, it should always prefer IPv6 and fallback to IPv4 when not available, but if you don't agree I would appreciate it very much if you could add said switch!

Well, I'm kind of a IPv6 addicted guy so I'm kinda biased, but putting that aside:

  1. Ipv6 has many architectural advantages to any network that uses that, also considering performance improvements, there are a number of articles that explain this, and it's not only about the almos infinite number of addresses
  2. Ipv6 transition is needed and inevitable, might as well start to test stuff before it gets here definitely and we end up with stuff that's broken/doesn't work well.
  3. Each user device that has IPv6 available and doesn't use it lets service and content providers know that the adoption is lower than it is, slowing the final transition to IPv6, which takes away the option of some users to enjoy it's benefits as stated previously

A switch can be a good option when accessing these services when the network has a hurricane electric tunnel, but that shouldn't be in your concern list as those users have plenty of ways to bypass that 😉

matthuisman commented 1 month ago

i always fine myself disabling ipv6 but thats probably im so used to ipv4 and cant be bothered typing more stuff :P so my bias may have come into play here.

im working on my new settings thing at present and once thats done ill add a "Ipv4/Ipv5" setting which will have various options 1) "Auto" - just uses the systems default 2) "Prefer IPv4" (current hard-coded value. will be the new default to keep behaviour same) 3) "Prefer IPv6" 4) "IPv4 Only" 5) "IPv6 Only"

tiagogaspar8 commented 1 month ago

Well, if you'd like to dip your toe in Ipv6 waters you can 100% reach out and we can exchange some ideas 😁

Damn, that's awesome, in love with the Ipv6 only I must say 🥺🥺🥺🥺

matthuisman commented 1 month ago

another reason i went with prefer ipv4 is lots of users use "smart dns" services etc. Which i suspect most are only ipv4. Also with my SMART URLS (https://www.matthuisman.nz/2022/06/slyguy-addons-smart-url-actions.html) - it probably easier to write rules for ipv4.

Anyway - i think its a good feature to implement soon-ish

tiagogaspar8 commented 1 month ago

I must say I've never heard of "smart DNS". Looking at your smart URLs I do have every device in my house routed to resolve via cloudfare so that shouldn't be an issue, and anyone can follow suit, Openwrt has great support to override DNS even if devices go rogue and decide to ask themselves to an upstream provider(Looking a at you netflix apps).

matthuisman commented 1 month ago

this setting was just introduced in script.module.slyguy -> v0.84.0

Under Slyguy Common -> Network -> IPv4/IPv6 Preference

It is a supporter only feature but im sure your already a supporter :)