Fix node ip parameter not being used (#661)

* Use node-ip if provided

* formatting
This commit is contained in:
David Zhao
2022-04-29 15:26:37 -07:00
committed by GitHub
parent ea61b588a2
commit 289d63ac53
2 changed files with 4 additions and 4 deletions

View File

@@ -65,7 +65,8 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
LoggerFactory: logging.NewLoggerFactory(logger.GetLogger()),
}
if conf.RTC.UseExternalIP && externalIP != "" {
// force it to the node IPs that the user has set
if externalIP != "" && (conf.RTC.UseExternalIP || conf.RTC.NodeIP != "") {
s.SetNAT1To1IPs([]string{externalIP}, webrtc.ICECandidateTypeHost)
}

View File

@@ -15,11 +15,10 @@ import (
"github.com/pion/webrtc/v3"
"go.uber.org/atomic"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/livekit-server/pkg/sfu/audio"
"github.com/livekit/livekit-server/pkg/sfu/twcc"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
)
const (