Class CreateTunnel.Builder
- java.lang.Object
-
- com.github.alexdlaird.ngrok.protocol.CreateTunnel.Builder
-
- Enclosing class:
- CreateTunnel
public static class CreateTunnel.Builder extends java.lang.Object
Builder for aCreateTunnel
, which can be used to construct a request that conforms tongrok
's tunnel definition.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateTunnel
build()
CreateTunnel.Builder
withAddr(int addr)
SeewithAddr(String)
.CreateTunnel.Builder
withAddr(java.lang.String addr)
The local port to which the tunnel will forward traffic, or a local directory or network address, defaults to "80"CreateTunnel.Builder
withAuth(java.lang.String auth)
HTTP basic authentication credentials to enforce on tunneled requestsCreateTunnel.Builder
withBindTls(boolean bindTls)
SeewithBindTls(BindTls)
.CreateTunnel.Builder
withBindTls(BindTls bindTls)
CreateTunnel.Builder
withClientCas(java.lang.String clientCas)
PEM TLS certificate authority at this path will verify incoming TLS client connection certificates.CreateTunnel.Builder
withCrt(java.lang.String crt)
PEM TLS certificate at this path to terminate TLS traffic before forwarding locally.CreateTunnel.Builder
withHostHeader(java.lang.String hostHeader)
Rewrite the HTTP Host header to this value, orpreserve
to leave it unchanged.CreateTunnel.Builder
withHostname(java.lang.String hostname)
Hostname to request (requires reserved name and DNS CNAME).CreateTunnel.Builder
withKey(java.lang.String key)
PEM TLS private key at this path to terminate TLS traffic before forwarding locally.CreateTunnel.Builder
withMetadata(java.lang.String metadata)
Arbitrary user-defined metadata that will appear in the ngrok service API when listing tunnels.CreateTunnel.Builder
withName(java.lang.String name)
The name of the tunnel.CreateTunnel.Builder
withoutInspect()
Disable HTTP request inspection on tunnels.CreateTunnel.Builder
withProto(Proto proto)
The tunnel protocol, defaults toProto.HTTP
.CreateTunnel.Builder
withRemoteAddr(java.lang.String remoteAddr)
Bind the remote TCP port on the given address.CreateTunnel.Builder
withSubdomain(java.lang.String subdomain)
Subdomain name to request.
-
-
-
Method Detail
-
withName
public CreateTunnel.Builder withName(java.lang.String name)
The name of the tunnel.
-
withProto
public CreateTunnel.Builder withProto(Proto proto)
The tunnel protocol, defaults toProto.HTTP
.
-
withAddr
public CreateTunnel.Builder withAddr(java.lang.String addr)
The local port to which the tunnel will forward traffic, or a local directory or network address, defaults to "80"
-
withAddr
public CreateTunnel.Builder withAddr(int addr)
SeewithAddr(String)
.
-
withoutInspect
public CreateTunnel.Builder withoutInspect()
Disable HTTP request inspection on tunnels.
-
withAuth
public CreateTunnel.Builder withAuth(java.lang.String auth)
HTTP basic authentication credentials to enforce on tunneled requests
-
withHostHeader
public CreateTunnel.Builder withHostHeader(java.lang.String hostHeader)
Rewrite the HTTP Host header to this value, orpreserve
to leave it unchanged.
-
withBindTls
public CreateTunnel.Builder withBindTls(BindTls bindTls)
-
withBindTls
public CreateTunnel.Builder withBindTls(boolean bindTls)
SeewithBindTls(BindTls)
.
-
withSubdomain
public CreateTunnel.Builder withSubdomain(java.lang.String subdomain)
Subdomain name to request. If unspecified, uses the tunnel name.
-
withHostname
public CreateTunnel.Builder withHostname(java.lang.String hostname)
Hostname to request (requires reserved name and DNS CNAME).
-
withCrt
public CreateTunnel.Builder withCrt(java.lang.String crt)
PEM TLS certificate at this path to terminate TLS traffic before forwarding locally.
-
withKey
public CreateTunnel.Builder withKey(java.lang.String key)
PEM TLS private key at this path to terminate TLS traffic before forwarding locally.
-
withClientCas
public CreateTunnel.Builder withClientCas(java.lang.String clientCas)
PEM TLS certificate authority at this path will verify incoming TLS client connection certificates.
-
withRemoteAddr
public CreateTunnel.Builder withRemoteAddr(java.lang.String remoteAddr)
Bind the remote TCP port on the given address.
-
withMetadata
public CreateTunnel.Builder withMetadata(java.lang.String metadata)
Arbitrary user-defined metadata that will appear in the ngrok service API when listing tunnels.
-
build
public CreateTunnel build()
-
-