Remove unnecessary 0.0.0.0 from listeners

This commit is contained in:
Alex X
2023-11-03 12:45:40 +03:00
parent 36166caccc
commit 39645cb3d8
6 changed files with 10 additions and 13 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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"}},
} }

View File

@@ -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
} }