veloren_voxygen/settings/
networking.rs1use hashbrown::HashSet;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Debug, Serialize, Deserialize)]
6#[serde(default)]
7pub struct NetworkingSettings {
8 pub username: String,
9 pub servers: Vec<String>,
10 pub default_server: String,
11 pub trusted_auth_servers: HashSet<String>,
12 pub use_srv: bool,
13 pub use_quic: bool,
14 pub validate_tls: bool,
15 pub player_physics_behavior: bool,
16 pub lossy_terrain_compression: bool,
17 pub enable_discord_integration: bool,
18}
19
20impl Default for NetworkingSettings {
21 fn default() -> Self {
22 Self {
23 username: "".to_string(),
24 servers: vec!["server.veloren.net".to_string()],
25 default_server: "server.veloren.net".to_string(),
26 trusted_auth_servers: ["https://auth.veloren.net"]
27 .iter()
28 .map(|s| s.to_string())
29 .collect(),
30 use_srv: true,
31 use_quic: false,
32 validate_tls: true,
33 player_physics_behavior: false,
34 lossy_terrain_compression: false,
35 enable_discord_integration: true,
36 }
37 }
38}