pub struct ProxyUrl {
pub protocol: ProxyProtocol,
pub host: String,
pub port: u16,
pub username: Option<String>,
pub password: Option<String>,
}Expand description
Represents a parsed proxy URL (e.g., socks5://user:pass@host:port)
Fields§
§protocol: ProxyProtocol§host: String§port: u16§username: Option<String>§password: Option<String>Implementations§
Source§impl ProxyUrl
impl ProxyUrl
Sourcepub fn parse(url: &str) -> Result<Self, String>
pub fn parse(url: &str) -> Result<Self, String>
Parse a proxy URL string into a ProxyUrl struct. Supported formats: socks5://[username:password@]host[:port] socks4://[username@]host[:port] http://[username:password@]host[:port] https://[username:password@]host[:port]
Sourcepub fn create_connector(&self) -> SocksConnectorEnum
pub fn create_connector(&self) -> SocksConnectorEnum
Create the appropriate connector for this proxy URL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyUrl
impl RefUnwindSafe for ProxyUrl
impl Send for ProxyUrl
impl Sync for ProxyUrl
impl Unpin for ProxyUrl
impl UnsafeUnpin for ProxyUrl
impl UnwindSafe for ProxyUrl
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