pub enum ProxyType {
Http,
Https,
Socks4,
Socks5,
}Expand description
§Proxy Type
Represents the protocol used by a proxy server.
Different proxy types offer varying levels of functionality, security, and speed:
- HTTP/HTTPS proxies only work with web traffic
- SOCKS proxies can handle any TCP/UDP traffic
- SOCKS5 adds authentication and IPv6 support over SOCKS4
§Examples
use gooty_proxy::definitions::enums::ProxyType;
use std::str::FromStr;
// Creating from string
let proxy_type = ProxyType::from_str("http").unwrap();
assert_eq!(proxy_type, ProxyType::Http);
// Converting to string
assert_eq!(ProxyType::Socks5.to_string(), "SOCKS5");Variants§
Http
HTTP proxy protocol - widely supported but unencrypted
Https
HTTPS proxy protocol - encrypted connection to the proxy
Socks4
SOCKS4 proxy protocol - supports TCP connections
Socks5
SOCKS5 proxy protocol - supports TCP, UDP, and authentication
Implementations§
Trait Implementations§
impl Copy for ProxyType
Source§impl<'de> Deserialize<'de> for ProxyType
impl<'de> Deserialize<'de> for ProxyType
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
impl Eq for ProxyType
impl StructuralPartialEq for ProxyType
Auto Trait Implementations§
impl Freeze for ProxyType
impl RefUnwindSafe for ProxyType
impl Send for ProxyType
impl Sync for ProxyType
impl Unpin for ProxyType
impl UnsafeUnpin for ProxyType
impl UnwindSafe for ProxyType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.