Proxy Endpoint (Origin Server)
Turns an endpoint's proxy on, changes its origin server, or turns it off. A proxy endpoint has no agent: ngris forwards its traffic straight to your own server.
Your server, the origin server, is a public IP address or hostname. The endpoint forwards one line per protocol, each optional, at least one: web traffic to origin_port (with the SSL check origin_tls), the endpoint's dedicated TCP port to origin_tcp_port, and its dedicated UDP port to origin_udp_port. To create a proxy endpoint in one call, send serving_mode: "proxy" to POST /v1/endpoints. The whole guide: Proxy endpoints.
On, change, off
- Turn on:
enabled: trueon an agent endpoint. The endpoint must be free: no agent connected, no app attached, no routing rules, not a per-device endpoint, and room under your plan for another proxy endpoint. - Change:
enabled: trueon a proxy endpoint. A change replaces every origin field: send every field. A line you leave out is removed, and an SSL check you leave out goes back toencrypt. - Turn off:
enabled: false. The endpoint is an agent endpoint again, and its server details are forgotten.
A TCP or UDP line forwards the endpoint's dedicated port of that protocol to that port of your server. Without a dedicated port of that protocol, the line isn't forwarded: give the endpoint one with POST /v1/endpoints/{uuid}/ports/{protocol}, and ngris picks a free port. Without a web line (origin_port), web visitors see the endpoint as offline, and its health checks are turned off: they need an HTTP line.
Your server receives each web request with the endpoint's hostname as its Host (over HTTPS, also as the TLS server name), and the visitor's address in X-Forwarded-For. TCP and UDP connections come from ngris.
Proxy endpoints are a plan feature (proxy_endpoints), and your plan sets how many you can have: GET /v1/account/entitlements shows yours. A quota-paused endpoint is read-only: every change is refused with 409 quota_paused.
Path parameters
uuid.Request body
true: forward to the server below (turn the proxy on, or change it). false: turn the proxy off; no other field is needed.enabled: true.1 to 65535. Left out: web visitors aren't forwarded.encrypt (the default), strict or off (below). Only with origin_port.1 to 65535. Left out: TCP isn't forwarded.1 to 65535. Left out: UDP isn't forwarded.With enabled: true, give at least one of origin_port, origin_tcp_port and origin_udp_port. Unknown fields are refused.
The SSL check (origin_tls)
Host and as the TLS server name), not your server's own name, so a certificate for your server's name alone doesn't pass.Response (200 OK)
The endpoint's mode and server, after the change. Empty fields are left out: after enabled: false, only uuid and serving_mode: "agent".
proxy while the proxy is on, agent once it is off.origin_tls comes with origin_port.Errors
A refusal carries code, which says why, and error, the sentence to show: relay it as it is.
enabled. Or a server detail is refused:origin_port_invalid: “Enter at least one of your server's ports: web, TCP or UDP, from 1 to 65535.”, “Enter your server's web port, from 1 to 65535.” or “Enter your server's TCP and UDP ports from 1 to 65535, or leave them empty.”origin_tls_invalid: “Choose how ngris connects to your server: encrypt, strict or off.” or “The SSL check is for your server's web port: give the web port too, or leave the SSL check out.”origin_host_invalid: the address isn't written as an IP address or hostname; error says what to fix.origin_not_allowed: “Use your server's public IP address or hostname…”: a private or reserved address, or one of ngris's own, is refused.origin_invalid: “Check your server's address and ports.”
entitlement_required (with "entitlement_required": "proxy_endpoints"): your plan has no proxy endpoints.proxy_endpoints_limit: “Your plan allows N proxy endpoint(s). Turn one off or upgrade your plan.”
endpoint not found: no such endpoint in your active account (another account's reads the same).endpoint_has_agent: “An agent is connected to this endpoint. Stop it before you turn on the proxy.”endpoint_ephemeral: “This is a per-device endpoint. Reserve it first, then turn on the proxy.”endpoint_serves_app: it serves an application. Detach it there first.endpoint_has_routing_rules: it has routing rules. Remove them first.endpoint_not_proxy: “This endpoint doesn't forward to a server.” (turning off an endpoint whose proxy isn't on).quota_paused: the endpoint is paused over your plan's limits and is read-only.
origin_check_unavailable: “The origin server can't be checked right now. Try again in a minute.”proxy_unavailable: proxy endpoints can't be used right now.