Skip to content

Should IPv6 addresses include brackets? #32

@PragmaticCypher

Description

@PragmaticCypher

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions