mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-26 20:31:11 +08:00
Remove unnecessary 0.0.0.0 from listeners
This commit is contained in:
@@ -32,7 +32,7 @@ func Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// default config
|
// default config
|
||||||
cfg.Mod.Listen = "0.0.0.0:1984"
|
cfg.Mod.Listen = ":1984"
|
||||||
|
|
||||||
// load config from YAML
|
// load config from YAML
|
||||||
app.LoadConfig(&cfg)
|
app.LoadConfig(&cfg)
|
||||||
|
@@ -26,7 +26,7 @@ func Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// default config
|
// default config
|
||||||
conf.Mod.Listen = "0.0.0.0:8554"
|
conf.Mod.Listen = ":8554"
|
||||||
conf.Mod.DefaultQuery = "video&audio"
|
conf.Mod.DefaultQuery = "video&audio"
|
||||||
|
|
||||||
app.LoadConfig(&conf)
|
app.LoadConfig(&conf)
|
||||||
|
@@ -13,7 +13,7 @@ func Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// default config
|
// default config
|
||||||
cfg.Mod.Listen = "0.0.0.0:8443"
|
cfg.Mod.Listen = ":8443"
|
||||||
|
|
||||||
// load config from YAML
|
// load config from YAML
|
||||||
app.LoadConfig(&cfg)
|
app.LoadConfig(&cfg)
|
||||||
|
@@ -1,16 +1,13 @@
|
|||||||
## Config
|
## Config
|
||||||
|
|
||||||
- supported networks: IPv4 (default), IPv6, both
|
|
||||||
- supported TCP: fixed port (default), disabled
|
- supported TCP: fixed port (default), disabled
|
||||||
- supported UDP: random port (default), fixed port
|
- supported UDP: random port (default), fixed port
|
||||||
|
|
||||||
| Config examples | IPv4 | IPv6 | TCP | UDP |
|
| Config examples | TCP | UDP |
|
||||||
|------------------------------|------|------|-------|--------|
|
|-----------------------|-------|--------|
|
||||||
| `listen: "0.0.0.0:8555/tcp"` | yes | no | fixed | random |
|
| `listen: ":8555/tcp"` | fixed | random |
|
||||||
| `listen: "0.0.0.0:8555/udp"` | yes | no | no | fixed |
|
| `listen: ":8555"` | fixed | fixed |
|
||||||
| `listen: "[::]:8555/tcp"` | no | yes | fixed | random |
|
| `listen: ""` | no | random |
|
||||||
| `listen: ":8555"` | yes | yes | fixed | fixed |
|
|
||||||
| `listen: ""` | yes | yes | no | random |
|
|
||||||
|
|
||||||
## Userful links
|
## Userful links
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@ func Init() {
|
|||||||
} `yaml:"webrtc"`
|
} `yaml:"webrtc"`
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.Mod.Listen = "0.0.0.0:8555/tcp"
|
cfg.Mod.Listen = ":8555/tcp"
|
||||||
cfg.Mod.IceServers = []pion.ICEServer{
|
cfg.Mod.IceServers = []pion.ICEServer{
|
||||||
{URLs: []string{"stun:stun.l.google.com:19302"}},
|
{URLs: []string{"stun:stun.l.google.com:19302"}},
|
||||||
}
|
}
|
||||||
|
@@ -219,7 +219,7 @@ func (b *Browser) ListenMulticastUDP() error {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
b.Recv, err = lc2.ListenPacket(ctx, "udp4", "0.0.0.0:5353")
|
b.Recv, err = lc2.ListenPacket(ctx, "udp4", ":5353")
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user