mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-15 22:47:52 +00:00
Add headers for vless ws
This commit is contained in:
@@ -63,11 +63,17 @@ pub struct TCPSettings {
|
||||
pub acceptProxyProtocol: Option<bool>,
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct HeaderSetting {
|
||||
pub Host: Option<String>,
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct WsSettings {
|
||||
pub path: Option<String>,
|
||||
// Headers map[string]string headers
|
||||
pub headers: Option<HeaderSetting>,
|
||||
pub acceptProxyProtocol: Option<bool>,
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ pub fn create_outbound_object(data: models::VlessData) -> Outbound {
|
||||
},
|
||||
wsSettings: if data.query.r#type == String::from("ws") {
|
||||
Some(WsSettings {
|
||||
headers: Some(HeaderSetting {
|
||||
Host: Some(data.query.host),
|
||||
}),
|
||||
path: Some(data.query.path),
|
||||
acceptProxyProtocol: None,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user