mirror of
https://github.com/YGGverse/hlstate-rs.git
synced 2026-03-31 17:15:37 +00:00
use ipv6 by default, remove extra config options
This commit is contained in:
parent
a549ad2f6e
commit
44a60cff11
5 changed files with 1 additions and 9 deletions
|
|
@ -1,9 +1,7 @@
|
|||
title = "HLState"
|
||||
|
||||
format_time = "%d/%m/%Y %H:%M"
|
||||
|
||||
# Bind server on given host
|
||||
host = "127.0.0.1"
|
||||
host = "[::1]"
|
||||
|
||||
# Bind server on given port
|
||||
port = 8027
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ use std::{
|
|||
#[serde(crate = "rocket::serde")]
|
||||
pub struct Config {
|
||||
pub debug: bool,
|
||||
pub description: Option<String>,
|
||||
pub format_time: String,
|
||||
pub host: IpAddr,
|
||||
pub masters: HashSet<SocketAddr>,
|
||||
pub port: u16,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@ use std::collections::HashSet;
|
|||
#[derive(Clone, Debug, Serialize)]
|
||||
#[serde(crate = "rocket::serde")]
|
||||
pub struct Global {
|
||||
pub format_time: String,
|
||||
pub masters: HashSet<std::net::SocketAddr>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,11 +77,9 @@ fn rocket() -> _ {
|
|||
}
|
||||
})
|
||||
.manage(Global {
|
||||
format_time: config.format_time,
|
||||
masters: config.masters,
|
||||
})
|
||||
.manage(Meta {
|
||||
description: config.description,
|
||||
title: config.title,
|
||||
version: env!("CARGO_PKG_VERSION").into(),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ use rocket::serde::Serialize;
|
|||
#[derive(Clone, Debug, Serialize)]
|
||||
#[serde(crate = "rocket::serde")]
|
||||
pub struct Meta {
|
||||
pub description: Option<String>,
|
||||
pub title: String,
|
||||
pub version: String,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue