pub struct PproxyArgs {Show 14 fields
pub local: Vec<String>,
pub remotes: Vec<String>,
pub verbose_level: u8,
pub debug: bool,
pub debug_level: u8,
pub daemon: bool,
pub reuse_port: bool,
pub auth_timeout: Option<Duration>,
pub system_proxy: bool,
pub help: bool,
pub version: bool,
pub known_unsupported: Vec<String>,
pub unknown_flags: Vec<String>,
pub strict_violations: Vec<String>,
}Expand description
Parsed pproxy-compatible CLI arguments.
Fields§
§local: Vec<String>Local listener URIs (from -l flags).
remotes: Vec<String>Remote/upstream URIs (from -r flags).
verbose_level: u8Verbosity level derived from -v/-vv/-vvv flags.
debug: bool-d flag: debug-level compatibility diagnostics.
debug_level: u8Number of -d occurrences, including clustered short options.
daemon: bool--daemon flag: daemon mode request (unsupported).
reuse_port: bool--reuse flag: listener SO_REUSEPORT.
auth_timeout: Option<Duration>--auth <seconds>: per-client authentication reuse interval.
system_proxy: bool--sys flag: apply the selected compatibility listener as the system proxy.
help: bool-h/--help was requested.
version: bool--version was requested.
known_unsupported: Vec<String>Known-but-unsupported flags that require a translation decision.
unknown_flags: Vec<String>Unknown flags that are not recognized.
strict_violations: Vec<String>Options accepted by the migration translator but not by the frozen pproxy 2.7.9 parser, plus positional arguments and long aliases. Compatibility execution treats these as parser errors.
Implementations§
Source§impl PproxyArgs
impl PproxyArgs
Sourcepub fn test_target(&self) -> Option<&str>
pub fn test_target(&self) -> Option<&str>
Return the target supplied to --test, preserving the parser’s
value-taking semantics for both compatibility execution entry points.
Sourcepub fn default_args() -> Self
pub fn default_args() -> Self
Create default pproxy args equivalent to running pproxy with no arguments.
Real pproxy defaults to a mixed HTTP/SOCKS4/SOCKS5 listener on :8080
with direct routing.
Sourcepub fn parse(raw: &[String]) -> Result<Self, CompatError>
pub fn parse(raw: &[String]) -> Result<Self, CompatError>
Parse from raw argument list (excluding argv[0]).
Sourcepub fn unknown_flag_diagnostics(&self) -> Vec<CompatWarning>
pub fn unknown_flag_diagnostics(&self) -> Vec<CompatWarning>
Identify unrecognized flags and return diagnostics for them.
Sourcepub fn unknown_flag_translation_output(&self) -> TranslationOutput
pub fn unknown_flag_translation_output(&self) -> TranslationOutput
Return a TranslationOutput containing the unknown-flag diagnostics.
Sourcepub fn has_unknown_or_unsupported(&self) -> bool
pub fn has_unknown_or_unsupported(&self) -> bool
Check if there are any unknown or unsupported flags.
Sourcepub fn strict_parser_violations(&self) -> Vec<String>
pub fn strict_parser_violations(&self) -> Vec<String>
Return parser violations against the exact 2.7.9 command surface.
Sourcepub fn version_string() -> String
pub fn version_string() -> String
Version string used by all compatibility entry points.
Sourcepub fn validate_strict_values(&self) -> Result<(), CompatError>
pub fn validate_strict_values(&self) -> Result<(), CompatError>
Validate values whose upstream argparse type= callbacks run during
parsing. URI failures therefore stay in the CLI-parse category rather
than being reported as a later runtime/configuration failure.
Sourcepub fn effective_auth_timeout(&self) -> Duration
pub fn effective_auth_timeout(&self) -> Duration
Return the pproxy default re-authentication interval when --auth was
omitted. The field remains optional so translation/API callers can
distinguish an explicit compatibility option from the parser default.
Sourcepub fn default_log_level(&self) -> &'static str
pub fn default_log_level(&self) -> &'static str
Default tracing log level chosen from -d and -v verbosity flags.
Resolution order (highest precedence first):
-vvv->trace-v/-vv/-d->debug- otherwise ->
info
-d is independent of -v and of --daemon. This helper is the
single source of truth used by the standalone compatibility binary
(and tests) so the observable behavior of -d is testable without
depending on tracing internals.
An explicit RUST_LOG environment variable remains authoritative
at the tracing_subscriber layer; this helper is only consulted when
RUST_LOG is unset or invalid.
Sourcepub fn parse_local_uris(&self) -> Result<Vec<PproxyUri>, CompatError>
pub fn parse_local_uris(&self) -> Result<Vec<PproxyUri>, CompatError>
Parse all local URIs into typed representations.
Sourcepub fn parse_remote_uris(&self) -> Result<Vec<PproxyUri>, CompatError>
pub fn parse_remote_uris(&self) -> Result<Vec<PproxyUri>, CompatError>
Parse all remote URIs into typed representations.
Sourcepub fn parse_remote_chains(&self) -> Result<Vec<PproxyChain>, CompatError>
pub fn parse_remote_chains(&self) -> Result<Vec<PproxyChain>, CompatError>
Parse all remote URIs into chain representations (supports __ separators).
Trait Implementations§
Source§impl Clone for PproxyArgs
impl Clone for PproxyArgs
Source§fn clone(&self) -> PproxyArgs
fn clone(&self) -> PproxyArgs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more