Class CreateTunnel
- java.lang.Object
-
- com.github.alexdlaird.ngrok.protocol.CreateTunnel
-
public class CreateTunnel extends java.lang.Object
An object that represents angrok
Tunnel creation request. This object can be serialized and passed to theHttpClient
.Basic Usage
final CreateTunnel createTunnel = new CreateTunnel.Builder() .withName("my-tunnel") .withProto(Proto.TCP) .withAddr(5000) .build(); final HttpClient httpClient = new DefaultHttpClient.Builder().build() final Response<SomePOJOResponse> postResponse = httpClient.post("http://localhost:4040/api/tunnels", createTunnel, Tunnel.class);
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CreateTunnel.Builder
Builder for aCreateTunnel
, which can be used to construct a request that conforms tongrok
's tunnel definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAddr()
Get the local port to which the tunnel will forward traffic.java.lang.String
getAuth()
Get HTTP basic authentication credentials enforced on tunnel requests.BindTls
getBindTls()
Getngrok
'sbind_tls
value.java.lang.String
getClientCas()
Get the PEM TLS certificate authority path that will be used to verify incoming TLS client connection certificates.java.lang.String
getCrt()
Get the PEM TLS certificate path that will be used to terminate TLS traffic before forwarding locally.java.lang.String
getHostHeader()
Get the HTTP Host header.java.lang.String
getHostname()
Get the hostname.java.lang.String
getKey()
Get the PEM TLS private key path that will be used to terminate TLS traffic before forwarding locally.java.lang.String
getMetadata()
Get the arbitrary user-defined metadata that will appear in the ngrok service API when listing tunnels.java.lang.String
getName()
Get the name of the tunnel.Proto
getProto()
Get the tunnel protocol.java.lang.String
getRemoteAddr()
Get the bound remote TCP port on the given address.java.util.List<java.lang.String>
getSchemes()
Get the schemes to be bound.java.lang.String
getSubdomain()
Get the subdomain.java.lang.Boolean
isInspect()
Whether HTTP request inspection on tunnels is enabled.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of the tunnel.
-
getProto
public Proto getProto()
Get the tunnel protocol.
-
getAddr
public java.lang.String getAddr()
Get the local port to which the tunnel will forward traffic.
-
isInspect
public java.lang.Boolean isInspect()
Whether HTTP request inspection on tunnels is enabled.
-
getAuth
public java.lang.String getAuth()
Get HTTP basic authentication credentials enforced on tunnel requests.
-
getHostHeader
public java.lang.String getHostHeader()
Get the HTTP Host header.
-
getBindTls
public BindTls getBindTls()
Getngrok
'sbind_tls
value.
-
getSubdomain
public java.lang.String getSubdomain()
Get the subdomain.
-
getHostname
public java.lang.String getHostname()
Get the hostname.
-
getCrt
public java.lang.String getCrt()
Get the PEM TLS certificate path that will be used to terminate TLS traffic before forwarding locally.
-
getKey
public java.lang.String getKey()
Get the PEM TLS private key path that will be used to terminate TLS traffic before forwarding locally.
-
getClientCas
public java.lang.String getClientCas()
Get the PEM TLS certificate authority path that will be used to verify incoming TLS client connection certificates.
-
getRemoteAddr
public java.lang.String getRemoteAddr()
Get the bound remote TCP port on the given address.
-
getMetadata
public java.lang.String getMetadata()
Get the arbitrary user-defined metadata that will appear in the ngrok service API when listing tunnels.
-
getSchemes
public java.util.List<java.lang.String> getSchemes()
Get the schemes to be bound.
-
-