Struct ngrok::config::TlsTunnelBuilder
source · pub struct TlsTunnelBuilder { /* private fields */ }
Expand description
A builder for a tunnel backing a TCP endpoint.
Implementations§
source§impl TlsTunnelBuilder
impl TlsTunnelBuilder
sourcepub fn allow_cidr(self, cidr: impl Into<String>) -> Self
pub fn allow_cidr(self, cidr: impl Into<String>) -> Self
Add the provided CIDR to the allowlist.
sourcepub fn proxy_proto(self, proxy_proto: ProxyProto) -> Self
pub fn proxy_proto(self, proxy_proto: ProxyProto) -> Self
Sets the PROXY protocol version for connections over this tunnel.
sourcepub fn metadata(self, metadata: impl Into<String>) -> Self
pub fn metadata(self, metadata: impl Into<String>) -> Self
Sets the opaque metadata string for this tunnel.
sourcepub fn forwards_to(self, forwards_to: impl Into<String>) -> Self
pub fn forwards_to(self, forwards_to: impl Into<String>) -> Self
Sets the ForwardsTo string for this tunnel. This can be viewed via the API or dashboard.
sourcepub fn domain(self, domain: impl Into<String>) -> Self
pub fn domain(self, domain: impl Into<String>) -> Self
Sets the domain to request for this edge.
sourcepub fn mutual_tlsca(self, mutual_tlsca: Bytes) -> Self
pub fn mutual_tlsca(self, mutual_tlsca: Bytes) -> Self
Adds a certificate in PEM format to use for mutual TLS authentication.
These will be used to authenticate client certificates for requests at the ngrok edge.
sourcepub fn termination(self, cert_pem: Bytes, key_pem: Bytes) -> Self
pub fn termination(self, cert_pem: Bytes, key_pem: Bytes) -> Self
Sets the key and certificate in PEM format for TLS termination at the ngrok edge.
Trait Implementations§
source§impl Clone for TlsTunnelBuilder
impl Clone for TlsTunnelBuilder
source§fn clone(&self) -> TlsTunnelBuilder
fn clone(&self) -> TlsTunnelBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl From<Session> for TlsTunnelBuilder
impl From<Session> for TlsTunnelBuilder
source§impl TunnelBuilder for TlsTunnelBuilder
impl TunnelBuilder for TlsTunnelBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for TlsTunnelBuilder
impl Send for TlsTunnelBuilder
impl Sync for TlsTunnelBuilder
impl Unpin for TlsTunnelBuilder
impl !UnwindSafe for TlsTunnelBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more