pub struct VLess {
pub host: String,
pub port: u32,
pub id: String,
pub parameters: Option<HashMap<String, String>>,
}
Expand description
Represents a VLess proxy.
Fields§
§host: String
The host address of the VLess proxy.
port: u32
The port number for the VLess proxy.
id: String
The UUID of the VLess proxy.
parameters: Option<HashMap<String, String>>
Additional parameters associated with the VLess proxy.
Implementations§
Source§impl VLess
impl VLess
Sourcepub fn to_url(&self) -> String
pub fn to_url(&self) -> String
Converts the VLess proxy information into a VLess URL.
§Example
use proxy_scraper::vless::VLess;
let proxy = VLess {
host: "example.com".to_string(),
port: 443,
id: "00000000-0000-0000-0000-000000000000".to_string(),
parameters: None,
};
let url = proxy.to_url();
assert_eq!(url, "vless://00000000-0000-0000-0000-000000000000@example.com:443?");
Trait Implementations§
Source§impl<'de> Deserialize<'de> for VLess
impl<'de> Deserialize<'de> for VLess
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VLess
impl RefUnwindSafe for VLess
impl Send for VLess
impl Sync for VLess
impl Unpin for VLess
impl UnwindSafe for VLess
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more