mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 00:36:38 +00:00
25 lines
564 B
Go
25 lines
564 B
Go
//go:build js
|
|
|
|
package internal
|
|
|
|
import (
|
|
icemaker "github.com/netbirdio/netbird/client/internal/peer/ice"
|
|
)
|
|
|
|
// createICEConfig creates ICE configuration for WASM environment.
|
|
func (e *Engine) createICEConfig() icemaker.Config {
|
|
cfg := icemaker.Config{
|
|
StunTurn: &e.stunTurn,
|
|
InterfaceBlackList: e.config.IFaceBlackList,
|
|
DisableIPv6Discovery: e.config.DisableIPv6Discovery,
|
|
NATExternalIPs: e.parseNATExternalIPMappings(),
|
|
}
|
|
|
|
if e.udpMux != nil {
|
|
cfg.UDPMux = e.udpMux.UDPMuxDefault
|
|
cfg.UDPMuxSrflx = e.udpMux
|
|
}
|
|
|
|
return cfg
|
|
}
|