Skip to main content

HTTP

Expose an internal HTTP service to the public internet by domain. The server must enable the domain gateway; see Domains.

domains is required and must be non-empty: a full domain (e.g. web.example.com), or a short prefix with no . (e.g. web, which requires server rootDomain). Wildcards are not supported.

Example: Expose a web service

Server:

# orbien-server.toml
listen = "0.0.0.0:9527"
httpGwPort = 80

Client:

# orbien.toml
server = "YOUR_SERVER_IP:9527"

[[tunnels]]
name = "web"
protocol = "http"
service = "127.0.0.1:8080"
domains = ["web.example.com"]

Point web.example.com at the server IP, then access:

curl http://web.example.com

Example: Basic authentication

[[tunnels]]
name = "web-auth"
protocol = "http"
service = "127.0.0.1:8080"
domains = ["web.example.com"]
basicAuthUser = "alice"
basicAuthPassword = "secret"

Requests must include Basic credentials; failure returns 401:

curl -u alice:secret http://web.example.com

Example: Rewrite Host

Rewrite the request Host when forwarding to the local service:

[[tunnels]]
name = "web"
protocol = "http"
service = "127.0.0.1:8080"
domains = ["web.example.com"]
hostHeaderRewrite = "127.0.0.1"

Parameters

ParameterRequiredDefaultDescription
nameYesTunnel name; must be unique
protocolYesAlways http
serviceYesLocal service address, e.g. 127.0.0.1:8080
domainsYesDomain list; at least one; full domain or a prefix with no . (prefix requires server rootDomain)
locationsNoPath prefix, e.g. /api; empty means all paths
basicAuthUserNoHTTP Basic username; if both this and basicAuthPassword are empty, auth is disabled
basicAuthPasswordNoHTTP Basic password
hostHeaderRewriteNoRewrite Host when forwarding to the local service; empty means no rewrite
transport.bandwidthNo0Bandwidth cap (Mbps); 0 means unlimited
transport.bandwidthLimitSideNoclientLimit side: client / server
transport.proxyProtocolVersionNoPROXY Protocol: v1 / v2