mirror of
https://github.com/Monibuca/plugin-webrtc.git
synced 2025-10-05 14:56:56 +08:00
补充SetNAT1To1IPs
This commit is contained in:
3
main.go
3
main.go
@@ -222,6 +222,9 @@ func (rtc *WebRTC) GetAnswer() ([]byte, error) {
|
||||
func run() {
|
||||
var m MediaEngine
|
||||
var s SettingEngine
|
||||
if len(config.PublicIP) > 0 {
|
||||
s.SetNAT1To1IPs(config.PublicIP, ICECandidateTypeHost)
|
||||
}
|
||||
if config.PortMin > 0 && config.PortMax > 0 {
|
||||
s.SetEphemeralUDPPortRange(config.PortMin, config.PortMax)
|
||||
}
|
||||
|
Reference in New Issue
Block a user