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

add Noise #156

Merged
merged 1 commit into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions multiaddr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ func TestConstructSucceeds(t *testing.T) {
"/ip4/127.0.0.1/tcp/9090/http/p2p-webrtc-direct",
"/ip4/127.0.0.1/tcp/127/ws",
"/ip4/127.0.0.1/tcp/127/ws",
"/ip4/127.0.0.1/tcp/127/tls",
"/ip4/127.0.0.1/tcp/127/tls/ws",
"/ip4/127.0.0.1/tcp/127/noise",
"/ip4/127.0.0.1/tcp/127/wss",
"/ip4/127.0.0.1/tcp/127/wss",
}
Expand Down
8 changes: 7 additions & 1 deletion protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
P_GARLIC32 = 0x01BF
P_P2P_WEBRTC_DIRECT = 0x0114
P_TLS = 0x01c0
P_NOISE = 0x01c6
P_WS = 0x01DD
P_WSS = 0x01DE // deprecated alias for /tls/ws
)
Expand Down Expand Up @@ -202,7 +203,11 @@ var (
Name: "tls",
Code: P_TLS,
VCode: CodeToVarint(P_TLS),
Size: 0,
}
protoNOISE = Protocol{
Name: "noise",
Code: P_NOISE,
VCode: CodeToVarint(P_NOISE),
}
protoWS = Protocol{
Name: "ws",
Expand Down Expand Up @@ -243,6 +248,7 @@ func init() {
protoUNIX,
protoP2P_WEBRTC_DIRECT,
protoTLS,
protoNOISE,
protoWS,
protoWSS,
} {
Expand Down