Struct ngrok::config::TlsTunnelBuilder
source · pub struct TlsTunnelBuilder { /* private fields */ }
Expand description
A builder for a tunnel backing a TCP endpoint.
https://ngrok.com/docs/tls/
Implementations§
source§impl TlsTunnelBuilder
impl TlsTunnelBuilder
sourcepub fn allow_cidr(&mut self, cidr: impl Into<String>) -> &mut Self
pub fn allow_cidr(&mut self, cidr: impl Into<String>) -> &mut Self
Add the provided CIDR to the allowlist.
https://ngrok.com/docs/tls/ip-restrictions/
sourcepub fn deny_cidr(&mut self, cidr: impl Into<String>) -> &mut Self
pub fn deny_cidr(&mut self, cidr: impl Into<String>) -> &mut Self
Add the provided CIDR to the denylist.
https://ngrok.com/docs/tls/ip-restrictions/
sourcepub fn proxy_proto(&mut self, proxy_proto: ProxyProto) -> &mut Self
pub fn proxy_proto(&mut self, proxy_proto: ProxyProto) -> &mut Self
Sets the PROXY protocol version for connections over this tunnel.
sourcepub fn metadata(&mut self, metadata: impl Into<String>) -> &mut Self
pub fn metadata(&mut self, metadata: impl Into<String>) -> &mut Self
Sets the opaque metadata string for this tunnel.
https://ngrok.com/docs/api/resources/tunnels/#tunnel-fields
sourcepub fn binding(&mut self, binding: impl Into<String>) -> &mut Self
pub fn binding(&mut self, binding: impl Into<String>) -> &mut Self
Sets the ingress configuration for this endpoint
sourcepub fn forwards_to(&mut self, forwards_to: impl Into<String>) -> &mut Self
pub fn forwards_to(&mut self, forwards_to: impl Into<String>) -> &mut Self
Sets the ForwardsTo string for this tunnel. This can be viewed via the API or dashboard.
This overrides the default process info if using TunnelBuilder::listen, and is in turn overridden by the url provided to ForwarderBuilder::listen_and_forward.
https://ngrok.com/docs/api/resources/tunnels/#tunnel-fields
sourcepub fn verify_upstream_tls(&mut self, verify_upstream_tls: bool) -> &mut Self
pub fn verify_upstream_tls(&mut self, verify_upstream_tls: bool) -> &mut Self
Disables backend TLS certificate verification for forwards from this tunnel.
sourcepub fn domain(&mut self, domain: impl Into<String>) -> &mut Self
pub fn domain(&mut self, domain: impl Into<String>) -> &mut Self
Sets the domain to request for this edge.
https://ngrok.com/docs/network-edge/domains-and-tcp-addresses/#domains
sourcepub fn mutual_tlsca(&mut self, mutual_tlsca: Bytes) -> &mut Self
pub fn mutual_tlsca(&mut self, mutual_tlsca: Bytes) -> &mut 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.
https://ngrok.com/docs/tls/mutual-tls/
sourcepub fn termination(&mut self, cert_pem: Bytes, key_pem: Bytes) -> &mut Self
pub fn termination(&mut self, cert_pem: Bytes, key_pem: Bytes) -> &mut Self
Sets the key and certificate in PEM format for TLS termination at the ngrok edge.
https://ngrok.com/docs/tls/tls-termination/
sourcepub fn policy<S>(&mut self, s: S) -> Result<&mut Self, S::Error>
pub fn policy<S>(&mut self, s: S) -> Result<&mut Self, S::Error>
DEPRECATED: use traffic_policy instead.
sourcepub fn traffic_policy(&mut self, policy_str: impl Into<String>) -> &mut Self
pub fn traffic_policy(&mut self, policy_str: impl Into<String>) -> &mut Self
Set policy for this edge.
Trait Implementations§
source§impl Clone for TlsTunnelBuilder
impl Clone for TlsTunnelBuilder
source§fn clone(&self) -> TlsTunnelBuilder
fn clone(&self) -> TlsTunnelBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ForwarderBuilder for TlsTunnelBuilder
impl ForwarderBuilder for TlsTunnelBuilder
source§fn listen_and_forward<'life0, 'async_trait>(
&'life0 self,
to_url: Url
) -> Pin<Box<dyn Future<Output = Result<Forwarder<TlsTunnel>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn listen_and_forward<'life0, 'async_trait>(
&'life0 self,
to_url: Url
) -> Pin<Box<dyn Future<Output = Result<Forwarder<TlsTunnel>, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§impl From<Session> for TlsTunnelBuilder
impl From<Session> for TlsTunnelBuilder
source§impl TunnelBuilder for TlsTunnelBuilder
impl TunnelBuilder for TlsTunnelBuilder
Auto Trait Implementations§
impl !Freeze for TlsTunnelBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more