mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
GetIP if config empty
This commit is contained in:
parent
559a858893
commit
1080ee8425
@ -131,10 +131,12 @@ func (s *WebRTC) Set() {
|
|||||||
s.VideoParams = viper.GetString("vparams")
|
s.VideoParams = viper.GetString("vparams")
|
||||||
s.NAT1To1IPs = viper.GetStringSlice("ip")
|
s.NAT1To1IPs = viper.GetStringSlice("ip")
|
||||||
|
|
||||||
|
if len(s.NAT1To1IPs) == 0 {
|
||||||
ip, err := utils.GetIP()
|
ip, err := utils.GetIP()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
s.NAT1To1IPs = append(s.NAT1To1IPs, ip)
|
s.NAT1To1IPs = append(s.NAT1To1IPs, ip)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
min := uint16(59000)
|
min := uint16(59000)
|
||||||
max := uint16(59100)
|
max := uint16(59100)
|
||||||
|
Loading…
Reference in New Issue
Block a user