OptionaladdrPort, network address, url, or named pipe. Defaults to 80. Examples: "80", "localhost:8080", "https://192.168.1.100:8443", "unix:/tmp/my.sock", "pipe://./my-pipe"
Optionalallow_A set of regular expressions used to match User-Agents that will be allowed.
On request, the User Agent Filter module will check the incoming User-Agent header value
against the list of defined allow and deny regular expression rules.
See User Agent Filter_ in the ngrok docs for additional details.
.. _User Agent Filter: https://ngrok.com/docs/cloud-edge/modules/user-agent-filter/
Optionalapp_The L7 application protocol to use for this edge, e.g. "http2" or "http1".
OptionalauthOptionalauthtokenConfigures the session to authenticate with the provided authtoken. You can find your existing authtoken or create a new one in the ngrok dashboard.
See the authtoken parameter in the ngrok docs for additional details.
Optionalauthtoken_Shortcut for calling [SessionBuilder::authtoken] with the value of the NGROK_AUTHTOKEN environment variable.
Optionalbasic_Credentials for basic authentication, with username and password colon separated.
OptionalbinUnused, will warn and be ignored
Optionalcircuit_Reject requests when 5XX responses exceed this ratio. Disabled when 0. See Circuit Breaker in the ngrok docs for additional details.
OptionalcompressionEnable gzip compression for HTTP responses. See Compression in the ngrok docs for additional details.
OptionalconfigUnused, will warn and be ignored
OptionalcrtThe certificate to use for TLS termination at the ngrok edge in PEM format. Only used if "proto" is "tls". See TLS Termination in the ngrok docs for additional details.
Optionaldeny_A set of regular expressions used to match User-Agents that will be denied.
On request, the User Agent Filter module will check the incoming User-Agent header value
against the list of defined allow and deny regular expression rules.
See User Agent Filter_ in the ngrok docs for additional details.
.. _User Agent Filter: https://ngrok.com/docs/cloud-edge/modules/user-agent-filter/
OptionaldomainThe domain to request for this edge, any valid domain or hostname that you have previously registered with ngrok. If using a custom domain, this requires registering in the ngrok dashboard and setting a DNS CNAME value.
Optionalforce_Force a new session connection to be made.
Optionalforwards_Returns a human-readable string presented in the ngrok dashboard and the API.
OptionalhostThe hostname for the listener to forward to. Only used if addr is not defined.
Optionalhost_Unused, will warn and be ignored
OptionalhostnameSynonym for domain
OptionalinspectUnused, will warn and be ignored
Optionalip_Restriction placed on the origin of incoming connections to the edge to only allow these CIDR ranges.
Optionalip_Restriction placed on the origin of incoming connections to the edge to deny these CIDR ranges.
OptionalkeyThe certificate to use for TLS termination at the ngrok edge in PEM format. Only used if "proto" is "tls". See TLS Termination in the ngrok docs for additional details.
OptionallabelsAdd label, value pairs for this listener, colon separated.
OptionalmetadataListener-specific opaque metadata. Viewable via the API.
Optionalmutual_Certificates to use for client authentication at the ngrok edge. Only used if "proto" is "tls" or "http". See Mutual TLS in the ngrok docs for additional details.
OptionalnameUnused, will warn and be ignored
Optionaloauth_OAuth configuration of domains to allow. See OAuth in the ngrok docs for additional details.
Optionaloauth_OAuth configuration of email addresses to allow. See OAuth in the ngrok docs for additional details.
Optionaloauth_OAuth configuration of client ID. Required for scopes. See OAuth in the ngrok docs for additional details.
Optionaloauth_OAuth configuration of client secret. Required for scopes. See OAuth in the ngrok docs for additional details.
Optionaloauth_OAuth configuration of the provider, e.g. "google". See OAuth in the ngrok docs for additional details.
Optionaloauth_OAuth configuration of scopes. See OAuth in the ngrok docs for additional details.
Optionaloidc_OIDC configuration of domains to allow. See OpenID Connect in the ngrok docs for additional details.
Optionaloidc_OIDC configuration of email addresses to allow. See OpenID Connect in the ngrok docs for additional details.
Optionaloidc_OIDC configuration of client ID. See OpenID Connect in the ngrok docs for additional details.
Optionaloidc_OIDC configuration of client secret. See OpenID Connect in the ngrok docs for additional details.
Optionaloidc_OIDC configuration of the issuer URL. See OpenID Connect in the ngrok docs for additional details.
Optionaloidc_OIDC configuration of scopes. See OpenID Connect in the ngrok docs for additional details.
OptionalonReturns log messages from the ngrok library.
Optionalon'closed' - connection is lost, 'connected' - reconnected
OptionalpolicyDEPRECATED: use TrafficPolicy instead.
OptionalportThe port for the listener to forward to. Only used if addr is not defined.
OptionalprotoThe type of listener to use, one of http|tcp|tls|labeled, defaults to http.
Optionalproxy_The version of PROXY protocol to use with this listener "1", "2", or "" if not using.
OptionalregionUnused, will warn and be ignored
Optionalremote_The TCP address to request for this edge. These addresses can be reserved in the ngrok dashboard to use across sessions. For example: remote_addr("2.tcp.ngrok.io:21746") Only used if proto is "tcp".
Optionalrequest_Adds a header to all requests to this edge. See Request Headers in the ngrok docs for additional details.
Optionalrequest_Removes a header from requests to this edge. See Request Headers in the ngrok docs for additional details.
Optionalresponse_Adds a header to all responses coming from this edge. See Response Headers in the ngrok docs for additional details.
Optionalresponse_Removes a header from responses from this edge. See Response Headers in the ngrok docs for additional details.
Optionalroot_Sets the file path to a default certificate in PEM format to validate ngrok Session TLS connections. Setting to "trusted" is the default, using the ngrok CA certificate. Setting to "host" will verify using the certificates on the host operating system. A client config set via tls_config after calling root_cas will override this value.
Corresponds to the root_cas parameter in the ngrok docs
OptionalschemesThe scheme that this edge should use. "HTTPS" or "HTTP", defaults to "HTTPS". If multiple are given only the last one is used.
Optionalserver_Configures the network address to dial to connect to the ngrok service. Use this option only if you are connecting to a custom agent ingress.
See the server_addr parameter in the ngrok docs for additional details.
Optionalsession_Configures the TLS certificate used to connect to the ngrok service while establishing the session. Use this option only if you are connecting through a man-in-the-middle or deep packet inspection proxy. Pass in the bytes of the certificate to be used to validate the connection, then override the address to connect to via the server_addr call.
Roughly corresponds to the root_cas parameter in the ngrok docs.
Optionalsession_Configures the opaque, machine-readable metadata string for this session. Metadata is made available to you in the ngrok dashboard and the Agents API resource. It is a useful way to allow you to uniquely identify sessions. We suggest encoding the value in a structured format like JSON.
See the metdata parameter in the ngrok docs for additional details.
OptionalsubdomainUnused, use domain instead, will warn and be ignored
Optionalterminate_Unused, will warn and be ignored
Optionaltraffic_The Traffic Policy to use for this endpoint.
Optionalverify_Whether to disable certificate verification for this listener
Optionalverify_WebhookVerification configuration, the provider to use. See Webhook Verification in the ngrok docs for additional details.
Optionalverify_WebhookVerification configuration, the secret to use. See Webhook Verification in the ngrok docs for additional details.
Optionalweb_Unused, will warn and be ignored
Optionalwebsocket_Convert incoming websocket connections to TCP-like streams.
Configuration object to pass to ngrok.forward()