5 ms·
And it gets even more fun when browsers such as firefox implemented this, then decided no we won't do it and removed the feature -- now there's no way to access
by evgpbfhnr 3mo ago
And it gets even more fun when browsers such as firefox implemented this, then decided no we won't do it and removed the feature -- now there's no way to access your router web interface over link-local address...
(rationale being that whatwg said no: https://github.com/whatwg/url/issues/392 https://github.com/whatwg/url/issues/392 ; firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=700999 https://bugzilla.mozilla.org/show_bug.cgi?id=700999 )
The "solution" is to use a proxy such as https://github.com/twisteroidambassador/prettysocks/tree/ipv6-literal https://github.com/twisteroidambassador/prettysocks/tree/ipv... which incidentally encode the % as a `s` and handle special URLs like this http://fe80--1ff-fe23-4567-890as3.ipv6-literal.net http://fe80--1ff-fe23-4567-890as3.ipv6-literal.net for you through the socks dns resolution feature...
I've never found anything else that works recently -_-
- Dagger2 3mo agoI very much didn't test it, but this patch might do the job on Firefox (provided there's no code in the UI doing extra validation on top): --- a/netwerk/base/nsURLHelper.cpp +++ b/netwerk/base/nsURLHelper.cpp @@ -928,3 +928,3 @@ bool net_IsValidIPv4Addr(const nsACString& aAddr) { bool net_IsValidIPv6Addr(const nsACString& aAddr) { - return mozilla::net::rust_net_is_valid_ipv6_addr(&aAddr); + return true; } Or if you actually wanted to do some validation, pass the address to getaddrinfo(): bool net_IsValidIPv6Addr(const nsACString& aAddr) { struct addrinfo *res, hints = {.ai_flags = AI_NUMERICHOST}; int err = getaddrinfo(aAddr.get(), nullptr, &hints, &res); if (err) return false; bool isValid = res[0].ai_family != AF_INET; freeaddrinfo(res); return isValid; } This way it's valid if your OS considers it a valid address.
- zamadatix 3mo agoCould you do the same trick just putting a temporary entry in the hosts file?
- deleted 3mo ago[deleted]