mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-16 15:07:53 +00:00
Use the new host field in websockets
This commit is contained in:
@@ -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>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user