Skip to main content

openvpn_mgmt_codec/
proxy_action.rs

1/// Proxy configuration for the `proxy` command (sent in response to a
2/// `>PROXY:` notification, requires `--management-query-proxy`).
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub enum ProxyAction {
5    /// Connect directly, no proxy.
6    None,
7
8    /// Use an HTTP proxy.
9    Http {
10        /// Proxy hostname or IP.
11        host: String,
12        /// Proxy port.
13        port: u16,
14        /// If true, pass the `"nct"` flag to allow only non-cleartext
15        /// authentication with the proxy.
16        non_cleartext_only: bool,
17    },
18
19    /// Use a SOCKS proxy.
20    Socks {
21        /// Proxy hostname or IP.
22        host: String,
23        /// Proxy port.
24        port: u16,
25    },
26}