Struct webkit6::NetworkProxySettings
source · pub struct NetworkProxySettings { /* private fields */ }
Expand description
Configures network proxies.
WebKitNetworkProxySettings can be used to provide a custom proxy configuration
to a #WebKitWebContext. You need to call webkit_web_context_set_network_proxy_settings()
with NetworkProxyMode::Custom
and a WebKitNetworkProxySettings.
GLib type: Boxed type with copy-on-clone semantics.
Implementations§
source§impl NetworkProxySettings
impl NetworkProxySettings
sourcepub fn as_ptr(&self) -> *mut WebKitNetworkProxySettings
pub fn as_ptr(&self) -> *mut WebKitNetworkProxySettings
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow(
ptr: &*mut WebKitNetworkProxySettings,
) -> &Self
pub unsafe fn from_glib_ptr_borrow( ptr: &*mut WebKitNetworkProxySettings, ) -> &Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut(
ptr: &mut *mut WebKitNetworkProxySettings,
) -> &mut Self
pub unsafe fn from_glib_ptr_borrow_mut( ptr: &mut *mut WebKitNetworkProxySettings, ) -> &mut Self
Borrows the underlying C value mutably.
source§impl NetworkProxySettings
impl NetworkProxySettings
sourcepub fn new(
default_proxy_uri: Option<&str>,
ignore_hosts: &[&str],
) -> NetworkProxySettings
pub fn new( default_proxy_uri: Option<&str>, ignore_hosts: &[&str], ) -> NetworkProxySettings
Create a new #WebKitNetworkProxySettings with the given @default_proxy_uri and @ignore_hosts.
The default proxy URI will be used for any URI that doesn’t match @ignore_hosts, and doesn’t match any of the schemes added with webkit_network_proxy_settings_add_proxy_for_scheme(). If @default_proxy_uri starts with “socks://”, it will be treated as referring to all three of the socks5, socks4a, and socks4 proxy types.
@ignore_hosts is a list of hostnames and IP addresses that the resolver should allow direct connections to.
Entries can be in one of 4 formats:
Note that when dealing with Unicode hostnames, the matching is done against the ASCII form of the name. Also note that hostname exclusions apply only to connections made to hosts identified by name, and IP address exclusions apply only to connections made to hosts identified by address. That is, if example.com has an address of 192.168.1.1, and @ignore_hosts contains only “192.168.1.1”, then a connection to “example.com” will use the proxy, and a connection to 192.168.1.1“ will not.
§default_proxy_uri
the default proxy URI to use, or None
.
§ignore_hosts
an optional list of hosts/IP addresses to not use a proxy for.
§Returns
A new #WebKitNetworkProxySettings.
sourcepub fn add_proxy_for_scheme(&mut self, scheme: &str, proxy_uri: &str)
pub fn add_proxy_for_scheme(&mut self, scheme: &str, proxy_uri: &str)
Adds a URI-scheme-specific proxy.
URIs whose scheme matches @uri_scheme will be proxied via @proxy_uri. As with the default proxy URI, if @proxy_uri starts with “socks://”, it will be treated as referring to all three of the socks5, socks4a, and socks4 proxy types.
§scheme
the URI scheme to add a proxy for
§proxy_uri
the proxy URI to use for @uri_scheme
Trait Implementations§
source§impl Clone for NetworkProxySettings
impl Clone for NetworkProxySettings
source§impl Debug for NetworkProxySettings
impl Debug for NetworkProxySettings
source§impl From<NetworkProxySettings> for Value
impl From<NetworkProxySettings> for Value
source§fn from(o: NetworkProxySettings) -> Self
fn from(o: NetworkProxySettings) -> Self
source§impl HasParamSpec for NetworkProxySettings
impl HasParamSpec for NetworkProxySettings
type ParamSpec = ParamSpecBoxed
§type SetValue = NetworkProxySettings
type SetValue = NetworkProxySettings
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, NetworkProxySettings>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for NetworkProxySettings
impl Hash for NetworkProxySettings
source§impl Ord for NetworkProxySettings
impl Ord for NetworkProxySettings
source§fn cmp(&self, other: &NetworkProxySettings) -> Ordering
fn cmp(&self, other: &NetworkProxySettings) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for NetworkProxySettings
impl PartialEq for NetworkProxySettings
source§fn eq(&self, other: &NetworkProxySettings) -> bool
fn eq(&self, other: &NetworkProxySettings) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NetworkProxySettings
impl PartialOrd for NetworkProxySettings
source§fn partial_cmp(&self, other: &NetworkProxySettings) -> Option<Ordering>
fn partial_cmp(&self, other: &NetworkProxySettings) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for NetworkProxySettings
impl StaticType for NetworkProxySettings
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for NetworkProxySettings
impl StructuralPartialEq for NetworkProxySettings
Auto Trait Implementations§
impl Freeze for NetworkProxySettings
impl RefUnwindSafe for NetworkProxySettings
impl !Send for NetworkProxySettings
impl !Sync for NetworkProxySettings
impl Unpin for NetworkProxySettings
impl UnwindSafe for NetworkProxySettings
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)