pub struct ProxySettings {
pub server: String,
pub bypass: Option<String>,
pub username: Option<String>,
pub password: Option<String>,
}Expand description
Network proxy settings for browser contexts and browser launches.
HTTP and SOCKS proxies are supported. Example proxy URLs:
http://myproxy.com:3128socks5://myproxy.com:3128
§Example
ⓘ
use playwright_rs::protocol::ProxySettings;
let proxy = ProxySettings {
server: "http://proxy.example.com:8080".to_string(),
bypass: Some(".example.com, chromium.org".to_string()),
username: Some("user".to_string()),
password: Some("secret".to_string()),
};See: https://playwright.dev/docs/api/class-browser#browser-new-context
Fields§
§server: StringProxy server URL (e.g., “http://proxy:8080” or “socks5://proxy:1080”)
bypass: Option<String>Comma-separated domains to bypass proxy (e.g., “.example.com, chromium.org”)
username: Option<String>Proxy username for HTTP proxy authentication
password: Option<String>Proxy password for HTTP proxy authentication
Trait Implementations§
Source§impl Clone for ProxySettings
impl Clone for ProxySettings
Source§fn clone(&self) -> ProxySettings
fn clone(&self) -> ProxySettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxySettings
impl Debug for ProxySettings
Source§impl<'de> Deserialize<'de> for ProxySettings
impl<'de> Deserialize<'de> for ProxySettings
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 ProxySettings
impl RefUnwindSafe for ProxySettings
impl Send for ProxySettings
impl Sync for ProxySettings
impl Unpin for ProxySettings
impl UnsafeUnpin for ProxySettings
impl UnwindSafe for ProxySettings
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