#[non_exhaustive]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::new("http://proxy.example.com:8080")
.bypass(".example.com, chromium.org")
.username("user")
.password("secret");See: https://playwright.dev/docs/api/class-browser#browser-new-context
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.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
Implementations§
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 (const: unstable) · 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