Skip to content

Commit

Permalink
Browser relay support (#168)
Browse files Browse the repository at this point in the history
* browser relay support

* remove redundant line

* config option for enabling p2p relay; defaults to true

* removed redundant logging

* updated package aliasing

* updated libp2p option overrides ordering

* p2prelay disabled by default, enabled only for head nodes
  • Loading branch information
zees-dev committed Sep 18, 2024
1 parent c7927e5 commit 56893f3
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func run() int {
host.WithWebsocketPort(cfg.Connectivity.WebsocketPort),
host.WithMustReachBootNodes(cfg.Connectivity.MustReachBootNodes),
host.WithDisabledResourceLimits(cfg.Connectivity.DisableConnectionLimits),
host.WithEnableP2PRelay(role == blockless.HeadNode),
}

if !cfg.Connectivity.NoDialbackPeers {
Expand Down
18 changes: 17 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ require (
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/onsi/ginkgo/v2 v2.17.1 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pion/datachannel v1.5.5 // indirect
github.com/pion/dtls/v2 v2.2.8 // indirect
github.com/pion/ice/v2 v2.3.11 // indirect
github.com/pion/interceptor v0.1.25 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.9 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.13 // indirect
github.com/pion/rtp v1.8.3 // indirect
github.com/pion/sctp v1.8.9 // indirect
github.com/pion/sdp/v3 v3.0.6 // indirect
github.com/pion/srtp/v2 v2.0.18 // indirect
github.com/pion/stun v0.6.1 // indirect
github.com/pion/transport/v2 v2.2.4 // indirect
github.com/pion/turn/v2 v2.1.4 // indirect
github.com/pion/webrtc/v3 v3.2.23 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/quic-go v0.42.0 // indirect
Expand Down Expand Up @@ -180,7 +196,7 @@ require (
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sync v0.7.0
golang.org/x/sys v0.20.0
golang.org/x/tools v0.21.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
Expand Down
Loading

0 comments on commit 56893f3

Please sign in to comment.