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

Feat: Webrtc go #4844

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lat-murmeldjur
Copy link

Checklist

  • I have filled out the description and linked the related issues.

Description

Webrtc multiaddress creation added for intercompatibility with in-browser node types

@@ -47,6 +47,7 @@ import (
lp2pswarm "github.com/libp2p/go-libp2p/p2p/net/swarm"
libp2pping "github.com/libp2p/go-libp2p/p2p/protocol/ping"
"github.com/libp2p/go-libp2p/p2p/transport/tcp"
webrtc "github.com/libp2p/go-libp2p/p2p/transport/webrtc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you need to explicitly name it?

@@ -156,6 +157,8 @@ func New(ctx context.Context, signer beecrypto.Signer, networkID uint64, overlay
var listenAddrs []string
if ip4Addr != "" {
listenAddrs = append(listenAddrs, fmt.Sprintf("/ip4/%s/tcp/%s", ip4Addr, port))
listenAddrs = append(listenAddrs, fmt.Sprintf("/ip4/%s/udp/31336/webrtc-direct", ip4Addr))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this number 31336 coming from. Pls add explainer comment

@zelig
Copy link
Member

zelig commented Oct 3, 2024

fix commit message (change to feat: webrtc...) to make lint happy

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

Successfully merging this pull request may close these issues.

2 participants