pub struct PproxyUri {Show 20 fields
pub scheme: String,
pub username: Option<String>,
pub password: Option<String>,
pub host: String,
pub port: u16,
pub tls: bool,
pub ssl: bool,
pub inbound: bool,
pub backward_num: u32,
pub rule: Option<String>,
pub rules_file: Option<String>,
pub rule_suffix: Option<String>,
pub path: Option<String>,
pub protocol_chain: Vec<String>,
pub transport_modifiers: Vec<String>,
pub local_bind: Option<String>,
pub fixed_target: Option<String>,
pub plugins: Vec<PproxyPluginSpec>,
pub auth_fragment: Option<String>,
pub raw: String,
}Expand description
Parsed pproxy-style URI.
Fields§
§scheme: StringProtocol scheme (e.g. “socks5”, “http”, “socks4”, “trojan”, “bind”, “listen”, “backward”).
username: Option<String>Optional username.
password: Option<String>Optional password.
host: StringHost (empty string means bind to all interfaces).
port: u16Port number.
tls: boolWhether TLS is requested (+tls suffix).
ssl: boolWhether SSL modifier was used (+ssl suffix, treated as unsupported variant of +tls).
inbound: boolWhether this is a reverse/inbound URI (+in suffix).
backward_num: u32Count of +in tokens parsed from the scheme (backward connection count).
rule: Option<String>Optional rule parameter from query string.
rules_file: Option<String>Optional rules_file parameter from query string (pproxy URI-attached rule file).
rule_suffix: Option<String>Canonical pproxy rule suffix when the query is not rule=/rules_file=.
path: Option<String>Optional path (used for unix:// scheme).
protocol_chain: Vec<String>Protocol tokens in the original scheme, excluding transport modifiers.
transport_modifiers: Vec<String>Non-protocol scheme modifiers, in source order (tls, ssl, in, …).
local_bind: Option<String>pproxy’s optional outbound source binding (/@localbind).
fixed_target: Option<String>Fixed destination used by tunnel-style protocols.
plugins: Vec<PproxyPluginSpec>Comma-delimited plugin metadata, retained in source order.
auth_fragment: Option<String>Fragment authentication, kept separately from URL userinfo.
raw: StringThe raw URI, retained for diagnostics.
Implementations§
Source§impl PproxyUri
impl PproxyUri
Sourcepub fn is_reverse_listener(&self) -> bool
pub fn is_reverse_listener(&self) -> bool
Returns true if this is a reverse proxy listener URI (bind/listen/backward/rebind scheme).
Sourcepub fn is_backward(&self) -> bool
pub fn is_backward(&self) -> bool
Returns true if this is a backward/upstream URI with the +in modifier
(e.g., socks5+in://...).
Sourcepub fn backward_num(&self) -> u32
pub fn backward_num(&self) -> u32
Returns the number of +in tokens parsed from the scheme (the backward
connection count). A single +in yields 1; multiple +in+in yields 2, etc.
Returns 0 if no +in modifier is present.
Sourcepub fn redacted_display(&self) -> String
pub fn redacted_display(&self) -> String
Redacted display — credentials shown as ****:****, Unix paths shown as unix://****.