Is this an ipv6-address? If so, why 3 ::: and slash

Source: A manga reader app (Mihon) that sources content (via user-added apps) from various sites (here: WeebCentral.com)

5 points · 11 comments · view on lemmy.world

11 Comments

UnderEu@mas.to · 3 pts · 335d (8 replies)

@dysprosium [2a06:98c1:3121::]:443

dysprosium@lemmy.dbzer0.com · 1 pts · 335d (7 replies)

Ohh that's so cool. That makes sense. But is that an official notation or just what the app spits out in his own style?

thelittleblackbird@lemmy.world · 3 pts · 335d (6 replies)

As far as I recall the official notion is with square brackets, to avoid exactly this confusion.

But nobody uses it, to be honest

Scoopta@programming.dev · 2 pts · 333d

It's only official for URIs, outside of URIs there is no official notation because there is no official notation for ports. :port is also a URI thing so while you'll find a lot of software using URI syntax or something similar it's the wild west when URIs aren't in use

dysprosium@lemmy.dbzer0.com · 1 pts · 335d (4 replies)

Can it actually be ambiguous though? If not, we should adopt this standard instead. It's so annoying adding the square bracket

chrysn@chaos.social · 4 pts · 335d (3 replies)

The square bracket is the standard, eg. as the IP-literal from RFC3986 <https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2>.

Any case where the three colons occur happens because someone just takes the IP address, prints a colon after it and the port, rather than just using existing libraries that do this right.

dysprosium@lemmy.dbzer0.com · 1 pts · 335d (2 replies)

Sure but is it actually ambiguous is what I wonder

Scoopta@programming.dev · 1 pts · 333d (1 reply)

It is ambiguous. See this which could be either an address or address + port. 2001:db8:1::2:443

That is a valid address...expanded it would be 2001:db8:1:0:0:0:2:443 ...but oh no, the intent was for it to be 2001:db8:1:0:0:0:0:2 with port 443...but you'd never know

dysprosium@lemmy.dbzer0.com · 1 pts · 333d

Yes good example. So it's down to a game of "do I know all my ports." 443, 22, 80, 5900, 8080, etc

Scoopta@programming.dev · 1 pts · 333d (1 reply)

Hmmm, this is weird. I was trying to figure out the / at the start since no one answered that. I know java's network stack does that but it doesn't format addresses like this example. Java formats individual addresses like /2001:db8:0:0:0:0:0:0 or if a port is included /[2001:db8:0:0:0:0:0:0]:443 so it's like...kinda a java format? Not sure

dysprosium@lemmy.dbzer0.com · 1 pts · 331d

Just Mihon then probably