mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-12-16 08:14:26 -05:00
Default config listen_address to empty string
If the address is `""` then an available address is automatically
picked.
```
// Network#allocate_tcp_port
if listen_address.is_empty() {
// If listen address is empty, find us a port iteratively
let port = self.find_available_tcp_port(5150)?;
let ip_addrs = available_unspecified_addresses();
Ok((port, ip_addrs))
} else {
// ...
}
```
This commit is contained in:
parent
c8429a0a36
commit
6c6f0c4966
1 changed files with 6 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ impl Default for VeilidConfigHTTPS {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
listen_address: String::from(":5150"),
|
listen_address: String::from(""),
|
||||||
path: String::from("app"),
|
path: String::from("app"),
|
||||||
url: None,
|
url: None,
|
||||||
}
|
}
|
||||||
|
|
@ -61,7 +61,7 @@ impl Default for VeilidConfigHTTP {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
listen_address: String::from(":5150"),
|
listen_address: String::from(""),
|
||||||
path: String::from("app"),
|
path: String::from("app"),
|
||||||
url: None,
|
url: None,
|
||||||
}
|
}
|
||||||
|
|
@ -106,7 +106,7 @@ impl Default for VeilidConfigUDP {
|
||||||
Self {
|
Self {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
socket_pool_size: 0,
|
socket_pool_size: 0,
|
||||||
listen_address: String::from(":5150"),
|
listen_address: String::from(""),
|
||||||
public_address: None,
|
public_address: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +139,7 @@ impl Default for VeilidConfigTCP {
|
||||||
connect: true,
|
connect: true,
|
||||||
listen: true,
|
listen: true,
|
||||||
max_connections: 32,
|
max_connections: 32,
|
||||||
listen_address: String::from(":5150"),
|
listen_address: String::from(""),
|
||||||
public_address: None,
|
public_address: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -175,7 +175,7 @@ impl Default for VeilidConfigWS {
|
||||||
connect: true,
|
connect: true,
|
||||||
listen: true,
|
listen: true,
|
||||||
max_connections: 16,
|
max_connections: 16,
|
||||||
listen_address: String::from(":5150"),
|
listen_address: String::from(""),
|
||||||
path: String::from("ws"),
|
path: String::from("ws"),
|
||||||
url: None,
|
url: None,
|
||||||
}
|
}
|
||||||
|
|
@ -212,7 +212,7 @@ impl Default for VeilidConfigWSS {
|
||||||
connect: true,
|
connect: true,
|
||||||
listen: false,
|
listen: false,
|
||||||
max_connections: 16,
|
max_connections: 16,
|
||||||
listen_address: String::from(":5150"),
|
listen_address: String::from(""),
|
||||||
path: String::from("ws"),
|
path: String::from("ws"),
|
||||||
url: None,
|
url: None,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue