Skip to main content

Args

Struct Args 

Source
pub struct Args {
Show 32 fields pub host: IpAddr, pub port: u16, pub port_explicit: bool, pub config: Option<PathBuf>, pub api_key: Option<String>, pub no_auth: bool, pub require_auth: bool, pub capabilities: Vec<String>, pub preset: Option<String>, pub no_rate_limit: bool, pub tunnel: bool, pub tunnel_command: Option<String>, pub relay: bool, pub relay_url: Option<String>, pub enroll_token: Option<String>, pub public_base: Option<String>, pub device_name: Option<String>, pub tls_cert: Option<PathBuf>, pub tls_key: Option<PathBuf>, pub tls_self_signed: bool, pub relay_fingerprint: Option<String>, pub relay_ca: Option<PathBuf>, pub allow_hosts: Vec<String>, pub audit_log: Option<PathBuf>, pub audit_max_bytes: Option<u64>, pub cors_allow_any: bool, pub log_level: Option<String>, pub version: bool, pub help: bool, pub check_update: bool, pub update: bool, pub no_update_check: bool,
}
Expand description

Command-line arguments.

Fields§

§host: IpAddr

Host address to bind to.

§port: u16

Port to listen on.

§port_explicit: bool

Whether the port was stated rather than defaulted.

A relay-attached device serves only itself on loopback, so the port is an implementation detail there — but only if the user did not ask for one.

§config: Option<PathBuf>

Path to configuration file.

§api_key: Option<String>

API key for authentication (overrides config file).

§no_auth: bool

Disable authentication.

§require_auth: bool

Require authentication, auto-generating an API key if none is provided.

§capabilities: Vec<String>

Capability strings scoping the issued token(s) (empty = full-control).

§preset: Option<String>

Role preset scoping the issued token(s) (operator/read-only/full-control).

§no_rate_limit: bool

Disable rate limiting.

§tunnel: bool

Expose the server through a Cloudflare quick tunnel.

§tunnel_command: Option<String>

Expose the server through an arbitrary tunnel command.

§relay: bool

Run as a relay server (shell-tunnel relay) instead of a shell gateway.

§relay_url: Option<String>

Attach to this relay instead of publishing through a tunnel.

§enroll_token: Option<String>

Shared secret devices present to attach to this relay.

§public_base: Option<String>

Public base URL this relay is reachable at.

§device_name: Option<String>

Stable name to claim on the relay (keeps one URL across reconnects).

§tls_cert: Option<PathBuf>

PEM certificate chain for serving HTTPS directly.

§tls_key: Option<PathBuf>

PEM private key matching tls_cert.

§tls_self_signed: bool

Generate a self-signed certificate when none is present.

§relay_fingerprint: Option<String>

Expect exactly this certificate fingerprint from the relay.

§relay_ca: Option<PathBuf>

Extra PEM certificate authority to trust when dialling a relay.

§allow_hosts: Vec<String>

Additional host names this server answers to.

§audit_log: Option<PathBuf>

Append an audit trail of executions and refusals to this file.

§audit_max_bytes: Option<u64>

Rotate the audit trail once it passes this many bytes.

§cors_allow_any: bool

Allow any CORS origin (permissive; opt-in for browser UIs).

§log_level: Option<String>

Log level (error, warn, info, debug, trace).

§version: bool

Show version and exit.

§help: bool

Show help and exit.

§check_update: bool

Check for updates and exit.

§update: bool

Perform self-update and exit.

§no_update_check: bool

Disable automatic update check on startup.

Trait Implementations§

Source§

impl Clone for Args

Source§

fn clone(&self) -> Args

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 Args

Source§

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

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

impl Default for Args

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Freeze for Args

§

impl RefUnwindSafe for Args

§

impl Send for Args

§

impl Sync for Args

§

impl Unpin for Args

§

impl UnsafeUnpin for Args

§

impl UnwindSafe for Args

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<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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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