use ipv6 by default, remove extra config options

This commit is contained in:
yggverse 2026-03-05 22:54:11 +02:00
parent a549ad2f6e
commit 44a60cff11
5 changed files with 1 additions and 9 deletions

View file

@ -1,9 +1,7 @@
title = "HLState" title = "HLState"
format_time = "%d/%m/%Y %H:%M"
# Bind server on given host # Bind server on given host
host = "127.0.0.1" host = "[::1]"
# Bind server on given port # Bind server on given port
port = 8027 port = 8027

View file

@ -8,8 +8,6 @@ use std::{
#[serde(crate = "rocket::serde")] #[serde(crate = "rocket::serde")]
pub struct Config { pub struct Config {
pub debug: bool, pub debug: bool,
pub description: Option<String>,
pub format_time: String,
pub host: IpAddr, pub host: IpAddr,
pub masters: HashSet<SocketAddr>, pub masters: HashSet<SocketAddr>,
pub port: u16, pub port: u16,

View file

@ -4,6 +4,5 @@ use std::collections::HashSet;
#[derive(Clone, Debug, Serialize)] #[derive(Clone, Debug, Serialize)]
#[serde(crate = "rocket::serde")] #[serde(crate = "rocket::serde")]
pub struct Global { pub struct Global {
pub format_time: String,
pub masters: HashSet<std::net::SocketAddr>, pub masters: HashSet<std::net::SocketAddr>,
} }

View file

@ -77,11 +77,9 @@ fn rocket() -> _ {
} }
}) })
.manage(Global { .manage(Global {
format_time: config.format_time,
masters: config.masters, masters: config.masters,
}) })
.manage(Meta { .manage(Meta {
description: config.description,
title: config.title, title: config.title,
version: env!("CARGO_PKG_VERSION").into(), version: env!("CARGO_PKG_VERSION").into(),
}) })

View file

@ -3,7 +3,6 @@ use rocket::serde::Serialize;
#[derive(Clone, Debug, Serialize)] #[derive(Clone, Debug, Serialize)]
#[serde(crate = "rocket::serde")] #[serde(crate = "rocket::serde")]
pub struct Meta { pub struct Meta {
pub description: Option<String>,
pub title: String, pub title: String,
pub version: String, pub version: String,
} }