Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should IPv6 addresses include brackets? #32

Open
PragmaticCypher opened this issue Apr 25, 2019 · 4 comments
Open

Should IPv6 addresses include brackets? #32

PragmaticCypher opened this issue Apr 25, 2019 · 4 comments
Assignees

Comments

@PragmaticCypher
Copy link

The IPv6 address format for a Scuttlebutt reference is:

net:fcbc:6c66:bcd4:d3b5:2a2a:60b3:9b86:498f:8008~shs:ppdSxn1pSozJIqtDE4pYgwaQGmswCT9y15VJJcXRntI=

A better way may be the Uniform Identifier Resource (URI) standard for IPv6 addresses (RFC 3986 section 3.2.2), which uses brackets to separate the address from the port:

net:[fcbc:6c66:bcd4:d3b5:2a2a:60b3:9b86:498f]:8008~shs:ppdSxn1pSozJIqtDE4pYgwaQGmswCT9y15VJJcXRntI=

This may have better parsing support across programming languages. For instance, Golang's 'net' package will only parse the URI formatted address.

@christianbundy
Copy link
Contributor

I'd like to see this change. I'm not sure whether it's compatible with the multiserver-address syntax, but if so I think this would just be a change to multiserver.

@arj03
Copy link
Member

arj03 commented Jun 15, 2019

@christianbundy but it is already used. The ws plugin in multiserver uses URL so tests in ssb-invite are failing for me, because it generates an addr with [::] :)

@christianbundy
Copy link
Contributor

Right, it's used in the websocket plugin but I don't think it works in the net plugin, does it?

@arj03
Copy link
Member

arj03 commented Jun 15, 2019

No, net plugin is not "affected". So I'm thinking something like fix multiserver-address and then use URL in net as well? Maybe together with your big PR :) What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants