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

Adding specification of more protocols #137

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
52 changes: 35 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# multiaddr

Composable and future-proof network addresses

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)
[![](https://img.shields.io/badge/project-multiformats-blue.svg?style=flat-square)](https://github.com/multiformats/multiformats)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](https://webchat.freenode.net/?channels=%23ipfs)
[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

> Composable and future-proof network addresses

- [Introduction](#introduction)
- [Use cases](#use-cases)
- [Encapsulation based on context](#encapsulation-based-on-context)
Expand Down Expand Up @@ -110,22 +110,40 @@ TODO: specify the decoding (string to byte-array) procedure
See [protocols.csv](protocols.csv) for a list of protocol codes and names,
and [protocols/](protocols/) for specifications of the currently supported protocols.

TODO: most of these are way underspecified

- /ip4, /ip6
- /ipcidr
- /dns4, /dns6
- [/ip4](protocols/IP4.md)
- [/tcp](protocols/TCP.md)
- [/ipfs](protocols/IPFS.md)
- [/ipns](protocols/IPNS.md)
- [/dccp](protocols/DCCP.md)
- [/ip6](protocols/IP6.md)
- [/ip6zone](protocols/IP6ZONE.md)
- [/ip6cidr](protocols/IP6CIDR.md)
- [/dns](protocols/DNS.md)
- [/dns4](protocols/DNS4.md)
- [/dns6](protocols/DNS6.md)
- [/dnsaddr](protocols/DNSADDR.md)
- /tcp
- /udp
- /utp
- /tls
- /ws, /wss
- /ipfs
- /p2p-circuit
- /p2p-webrtc-star, /p2p-webrtc-direct
- /p2p-websocket-star
- /onion
- [/sctp](protocols/SCTP.md)
- [/udp](protocols/UDP.md)
- [/webrtc](protocols/WEBRTC.md)
- [/udt](protocols/UDT.md)
- [/utp](protocols/UTP.md)
- [/unix](protocols/UNIX.md)
- [/thread](protocols/THREAD.md)
- [/p2p](protocols/P2P.md)
- [/https](protocols/HTTPS.md)
- [/onion](protocols/ONION.md)
- [/onion3](protocols/ONION3.md)
- [/garlic64](protocols/GARLIC64.md)
- [/garlic32](protocols/GARLIC32.md)
- [/tls](protocols/TLS.md)
- [/noise](protocols/NOISE.md)
- [/quic](protocols/QUIC.md)
- [/webtransport](protocols/WEBTRANSPORT.md)
- [/certhash](protocols/CERTHASH.md)
- [/ws](protocols/WS.md)
- [/wss](protocols/WSS.md)
- [/http](protocols/HTTP.md)
- [/memory](protocols/MEMORY.md)


## Implementations
Expand Down
21 changes: 11 additions & 10 deletions protocols.csv
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
code, size, name, comment
4, 32, ip4,
6, 16, tcp,
273, 16, udp,
33, 16, dccp,
41, 128, ip6,
42, V, ip6zone, rfc4007 IPv6 zone
43, 8, ipcidr, CIDR mask for IP addresses
43, 8, ipcidr, [NOT REGISTERED AS MULTICODEC] CIDR mask for IP addresses
53, V, dns, domain name resolvable to both IPv6 and IPv4 addresses
54, V, dns4, domain name resolvable only to IPv4 addresses
55, V, dns6, domain name resolvable only to IPv6 addresses
56, V, dnsaddr,
132, 16, sctp,
273, 16, udp,
275, 0, p2p-webrtc-star,
276, 0, p2p-webrtc-direct,
277, 0, p2p-stardust,
280, 0, webrtc, ICE-lite webrtc transport
290, 0, p2p-circuit,
301, 0, udt,
302, 0, utp,
400, V, unix,
406, ?, thread, Textile Thread
421, V, p2p, preferred over /ipfs
421, V, ipfs, backwards compatibility; equivalent to /p2p
443, 0, https, Deprecated alias for /tls/http
444, 96, onion,
445, 296, onion3,
446, V, garlic64,
Expand All @@ -25,14 +32,8 @@ code, size, name, comment
460, 0, quic,
465, 0, webtransport,
466, V, certhash,
480, 0, http, HyperText Transfer Protocol
443, 0, https, Deprecated alias for /tls/http
477, 0, ws, WebSockets
478, 0, wss, Deprecated alias for /tls/ws
479, 0, p2p-websocket-star,
277, 0, p2p-stardust,
275, 0, p2p-webrtc-star,
276, 0, p2p-webrtc-direct,
280, 0, webrtc, ICE-lite webrtc transport
290, 0, p2p-circuit,
777, V, memory, in memory transport for self-dialing and testing; arbitrary
480, 0, http, HyperText Transfer Protocol
777, V, memory, [NOT REGISTERED AS MULTICODEC] in memory transport for self-dialing and testing; arbitrary
17 changes: 17 additions & 0 deletions protocols/DCCP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `dccp`

`dccp` is a protocol that defines which DCCP port should be used.

## Representation Format

### Human-readable

TODO

### Binary

TODO

## Binary Size

16 bits (Implicit)
21 changes: 21 additions & 0 deletions protocols/DNS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# `dns`

`dns` is a protocol that defines which domain name should be used.

## Representation Format

### Human-readable

The human-readable format of the `dns` protocol uses the well-known textual representation:

example.com

TODO: Consider also supporting with trailing dot.

### Binary

TODO: Consider binary format. Is it a string prefixed by an unsigned varint or should the FQDN encoding be used, where every label is prefixed and the last label has zero length?

## Binary Size

Unknown
21 changes: 21 additions & 0 deletions protocols/DNS4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# `dns4`

`dns4` is a protocol that defines which domain name should be used, but only by resolving it to a IPv4 address.
ben221199 marked this conversation as resolved.
Show resolved Hide resolved

## Representation Format

### Human-readable

The human-readable format of the `dns4` protocol uses the well-known textual representation:

example.com

TODO: Consider also supporting with trailing dot.

### Binary

TODO: Consider binary format. Is it a string prefixed by an unsigned varint or should the FQDN encoding be used, where every label is prefixed and the last label has zero length?

## Binary Size

Unknown
21 changes: 21 additions & 0 deletions protocols/DNS6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# `dns6`

`dns6` is a protocol that defines which domain name should be used, but only by resolving it to a IPv6 address.

## Representation Format

### Human-readable

The human-readable format of the `dns6` protocol uses the well-known textual representation:

example.com

TODO: Consider also supporting with trailing dot.

### Binary

TODO: Consider binary format. Is it a string prefixed by an unsigned varint or should the FQDN encoding be used, where every label is prefixed and the last label has zero length?

## Binary Size

Unknown
17 changes: 17 additions & 0 deletions protocols/HTTP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `http`

`http` is a protocol that defines to use HTTP.

## Representation Format

### Human-readable

None

### Binary

None

## Binary Size

None
19 changes: 19 additions & 0 deletions protocols/HTTPS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# `https`

`https` is a protocol that defines to use secure HTTP.

Deprecated: use `/tls/http`.

## Representation Format

### Human-readable

None

### Binary

None

## Binary Size

None
23 changes: 23 additions & 0 deletions protocols/IP4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# `ip4`

`ip4` is a protocol that defines which IPv4 address should be used.

## Representation Format

### Human-readable

The human-readable format of the `ip4` protocol uses the quad-dotted format:

127.0.9.1

TODO: Consider also supporting decimal format.

### Binary

The binary format of the `ip4` protocol uses the well-known binary format of 32 bits:

0x7F 0x00 0x00 0x01

## Binary Size

32 bits (Implicit)
23 changes: 23 additions & 0 deletions protocols/IP6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# `ip6`

`ip6` is a protocol that defines which IPv6 address should be used.

## Representation Format

### Human-readable

The human-readable format of the `ip6` protocol uses the colon-seperated format:

2604:1380:4602:5c00::3

TODO: Consider also supporting decimal format and/or format that encloses the IP address with `[` and `]`.

### Binary

The binary format of the `ip6` protocol uses the well-known binary format of 128 bits:

0x26 0x04 0x13 0x80 0x46 0x02 0x5c 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x03

## Binary Size

128 bits (Implicit)
17 changes: 17 additions & 0 deletions protocols/IP6ZONE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `ip6zone`

`ip6zone` is a protocol that defines which IPv6 Scope Zone should be used.

## Representation Format

### Human-readable

TODO

### Binary

TODO

## Binary Size

Variable (Explicit)
17 changes: 17 additions & 0 deletions protocols/IPFS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `ipfs`

`ipfs` is a protocol that defines which file should be queried using the CID containing its hash.

## Representation Format

### Human-readable

See the CID specification.

### Binary

See the CID specification.

## Binary Size

Variable (Explicit)
17 changes: 17 additions & 0 deletions protocols/IPNS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `ipns`

`ipns` is a protocol that defines which file should be queried using the CID containing its hashed public key.

## Representation Format

### Human-readable

See the CID specification.

### Binary

See the CID specification.

## Binary Size

Variable (Explicit)
17 changes: 17 additions & 0 deletions protocols/P2P.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `p2p`

`p2p` is a protocol that defines which peer should be connected to using the PeerId containing its hashed public key.

## Representation Format

### Human-readable

See the PeerId specification.
ben221199 marked this conversation as resolved.
Show resolved Hide resolved

### Binary

See the PeerId specification.

## Binary Size

Variable (Explicit)
17 changes: 17 additions & 0 deletions protocols/QUIC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# `quic`

`quic` is a protocol that defines to use QUIC.

## Representation Format

### Human-readable

None

### Binary

None

## Binary Size

None
Loading