Use the new host field in websockets

This commit is contained in:
Keivan-sf
2025-07-26 12:14:39 +03:30
parent cd0b282c6e
commit 5e594c1156
2 changed files with 2 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ pub struct HeaderSetting {
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct WsSettings { pub struct WsSettings {
pub path: Option<String>, pub path: Option<String>,
pub headers: Option<HeaderSetting>, pub Host: Option<String>,
pub acceptProxyProtocol: Option<bool>, pub acceptProxyProtocol: Option<bool>,
} }

View File

@@ -34,9 +34,7 @@ pub fn create_outbound_object(data: models::VlessData) -> Outbound {
}, },
wsSettings: if data.query.r#type == String::from("ws") { wsSettings: if data.query.r#type == String::from("ws") {
Some(WsSettings { Some(WsSettings {
headers: Some(HeaderSetting { Host: Some(data.query.host),
Host: Some(data.query.host),
}),
path: Some( path: Some(
urlencoding::decode(data.query.path.as_str()) urlencoding::decode(data.query.path.as_str())
.unwrap() .unwrap()