Skip to main content

CompatibilityRuntimeHooks

Struct CompatibilityRuntimeHooks 

Source
pub struct CompatibilityRuntimeHooks {
    pub auth_reuse: Option<Arc<AuthReuseCache>>,
    pub system_proxy: Option<SystemProxyRequest>,
    pub allow_insecure_ssh_host_keys: bool,
}
Expand description

Minimal residual compatibility surface for runtime/post-bind behavior.

Only state that genuinely requires runtime participation lives here:

  • auth_reuse: pre-built source-IP auth reuse cache for pproxy --auth. The compatibility facade computes the timeout via PproxyArgs::effective_auth_timeout() and constructs AuthReuseCache::new(timeout) before startup; the generic supervisor never interprets pproxy argument semantics, it only threads the typed handle into inbound authentication.
  • system_proxy: opt-in post-bind OS proxy hook (--sys). None means no OS mutation.
  • allow_insecure_ssh_host_keys: narrow SSH host-key policy resolved by the compatibility facade from EGRESS_SSH_INSECURE_HOST_KEYS. Native startup never sets it.

Pre-start adapter policy is intentionally absent: -d/-v log-level selection is resolved by the CLI facade via PproxyArgs::default_log_level() before supervisor construction with explicit RUST_LOG precedence, and structured compatibility warnings stay in eggress-pproxy-compat. The generic supervisor consumes ordinary tracing and emits one generic connection completed log backed by normal session reports.

Native startup passes None; compatibility startup passes Some(hooks) via start_from_config_with_compatibility.

Legacy callers that still construct CompatibilityOptions should convert via CompatibilityRuntimeHooks::from_legacy_options; the legacy DTO never enters supervisor state.

Fields§

§auth_reuse: Option<Arc<AuthReuseCache>>§system_proxy: Option<SystemProxyRequest>§allow_insecure_ssh_host_keys: bool

Implementations§

Source§

impl CompatibilityRuntimeHooks

Source

pub fn from_facade( auth_timeout: Duration, system_proxy: bool, allow_insecure_ssh_host_keys: bool, ) -> Self

Build the canonical pproxy compatibility hooks from already-parsed facade decisions.

auth_timeout is the fully-resolved reuse interval (typically PproxyArgs::effective_auth_timeout()); system_proxy mirrors --sys; allow_insecure_ssh_host_keys mirrors ssh_insecure_acknowledged() (explicit EGRESS_SSH_INSECURE_HOST_KEYS opt-in). This keeps pproxy argument interpretation in the facade while giving runtime a single typed construction point.

Source

pub fn from_legacy_options(options: &CompatibilityOptions) -> Self

Canonical conversion from the legacy public facade DTO.

Ownership: auth_timeout/system_proxy/compatibility_mode are interpreted here once at the boundary; the supervisor never stores CompatibilityOptions.

  • auth_timeout: Some(d) becomes a bounded process-local AuthReuseCache; None means no reuse cache. The pproxy CLI’s 30-day default lives in PproxyArgs::effective_auth_timeout() at the facade, not here.
  • system_proxy: true becomes Some(SystemProxyRequest) (post-bind opt-in); false becomes None (no OS mutation).
  • compatibility_mode is consumed into allow_insecure_ssh_host_keys and never becomes a generic runtime mode flag: insecure SSH is permitted only when compatibility_mode is true and ssh_insecure_acknowledged() observes the explicit EGRESS_SSH_INSECURE_HOST_KEYS opt-in. Non-compatibility startup stays secure even if the variable is set.
  • debug/verbose_level are legacy presentation inputs and are intentionally ignored here; logging policy is facade-owned (see PproxyArgs::default_log_level()). The legacy startup shim emits a single warning for non-default values.
Source

pub fn is_empty(&self) -> bool

Whether this hook set carries no compatibility state.

Used by the legacy startup shim to preserve native-equivalent behavior for CompatibilityOptions::default() instead of fabricating hooks.

Trait Implementations§

Source§

impl Clone for CompatibilityRuntimeHooks

Source§

fn clone(&self) -> CompatibilityRuntimeHooks

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompatibilityRuntimeHooks

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CompatibilityRuntimeHooks

Source§

fn default() -> CompatibilityRuntimeHooks

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more