mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-16 06:57:52 +00:00
Url decode the path
This commit is contained in:
9
Cargo.lock
generated
9
Cargo.lock
generated
@@ -1,6 +1,6 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
@@ -236,6 +236,12 @@ version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
|
||||
[[package]]
|
||||
name = "urlencoding"
|
||||
version = "2.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.1"
|
||||
@@ -251,6 +257,7 @@ dependencies = [
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"urlencoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -11,3 +11,4 @@ querystring = "1.1.0"
|
||||
regex = "1.9.6"
|
||||
serde = { version = "1.0.189", features = ["derive"] }
|
||||
serde_json = "1.0.107"
|
||||
urlencoding = "2"
|
||||
|
||||
@@ -31,7 +31,11 @@ pub fn create_outbound_object(data: models::VlessData) -> Outbound {
|
||||
headers: Some(HeaderSetting {
|
||||
Host: Some(data.query.host),
|
||||
}),
|
||||
path: Some(data.query.path),
|
||||
path: Some(
|
||||
urlencoding::decode(data.query.path.as_str())
|
||||
.unwrap()
|
||||
.into_owned(),
|
||||
),
|
||||
acceptProxyProtocol: None,
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user