Proxy endpoints
Proxy endpoints
A proxy endpoint forwards its traffic straight to your own server, the origin server, at a public IP address or hostname. There is no agent to install or keep running. Visitors use the endpoint's hostname, and ngris sends what arrives there to your server.
An endpoint is one of three kinds: an agent tunnel (your agents connect to it), an app endpoint (an app hosted on ngris), or a proxy endpoint. An agent endpoint can become a proxy endpoint, and back.
Your traffic policies work on a proxy endpoint in all four phases, and request-phase edge functions run on it too.
Proxy endpoints are a plan feature, and your plan sets how many you can have (GET /v1/account/entitlements shows yours). TCP and UDP lines also need dedicated ports, a plan feature of their own.
Create a proxy endpoint
- Open Endpoints and click New Endpoint.
- Pick Proxy endpoint: “Forward traffic to your origin server's IP address and port — no agent needed.”
- On the Origin server step (“Where is your origin server?”), type your server's public IP address or hostname under Origin server. Under What it forwards, set one line per protocol: HTTP with its port and SSL check, TCP or UDP with its port. Add a protocol adds a line.
- On the Domain step, pick the domain and the name, and create the endpoint.
A TCP or UDP line gets the endpoint a dedicated port of that protocol: “ngris gives this endpoint a dedicated TCP port for this line.” (see TCP and UDP).
The Endpoints list's Type filter has Proxy endpoints, and each one's row is marked Proxy.
Turn an agent endpoint into one
On the endpoint's Overview page, open the Proxy to origin server section, below Force HTTPS and Response Cache. Give your server, as above, and turn its switch on. The endpoint must be free: no agent connected, no app attached, no routing rules, not a per-device endpoint (reserve it first), and room under your plan for another proxy endpoint. While an agent is connected, the server form and the switch can't be used: stop the agent, then reload the page.
With the API or the CLI
Create one in a single call with serving_mode: "proxy" (POST /v1/endpoints), or turn an agent endpoint into one with PUT /v1/endpoints/{uuid}/proxy.
curl -X POST "https://api.ngris.com/v1/endpoints" \
-H "X-API-KEY: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{"serving_mode": "proxy", "origin_host": "203.0.113.10", "origin_port": 443, "origin_tls": "encrypt"}'
ngris api endpoints create --serving-mode proxy --origin-host 203.0.113.10 --origin-port 443
ngris api endpoints set-proxy <endpoint_uuid> --enabled true --origin-host 203.0.113.10 --origin-port 443
What it forwards
One line per protocol, each optional, at least one.
| Line | In the API | What it does |
|---|---|---|
| HTTP | origin_port, origin_tls | Web visitors go to this port of your server, with the SSL check below. Without an HTTP line, web visitors see the endpoint as offline. |
| TCP | origin_tcp_port | The endpoint's dedicated TCP port goes to this port of your server. |
| UDP | origin_udp_port | The endpoint's dedicated UDP port goes to this port of your server. |
The SSL check
The HTTP line's SSL check says how ngris connects to your server's web port.
| SSL check | What it means |
|---|---|
Encrypt only (encrypt, the default) | HTTPS to your server. Its certificate isn't checked, so a self-signed certificate works. |
Strict (strict) | HTTPS with a valid public certificate for the endpoint's own hostname. ngris connects with the endpoint's name, not your server's own name, so a certificate for your server's name alone doesn't pass: your server needs one for the endpoint's hostname. |
Off (off) | Plain HTTP. |
TCP and UDP
TCP and UDP use a dedicated port: the endpoint's own fixed port. A TCP line forwards the endpoint's dedicated TCP port to your server's TCP port, and a UDP line does the same for UDP. Without a dedicated port of that protocol, the line isn't forwarded.
ngris picks the port; you never type one. In the dashboard, a TCP or UDP line gets one for you. The endpoint's Dedicated Ports page has one row per protocol, with the address or None: Reserve a TCP port or Reserve a UDP port asks for one, and Release gives it back. The API does the same with POST and DELETE /v1/endpoints/{uuid}/ports/{protocol}.
The Proxy to origin server section on the Overview page shows each line with your server: the HTTP line as <server>:<server port>, a TCP or UDP line as <hostname>:<dedicated port> → <server>:<server port>, or Not forwarded when there is no such line or no dedicated port for it. An IPv6 server is written in brackets, as in [2001:db8::1]:53.
What your server receives
- The endpoint's hostname as the Host. Each web request names the endpoint's hostname, not your server's own name, and over HTTPS the TLS server name is the endpoint's hostname too.
- The visitor's address in
X-Forwarded-For, on web requests. - TCP and UDP connections from ngris, not from the visitor.
ngris connects to your server from its own addresses. You don't have to limit your server to them; if you want to, the Proxy to origin server section on the endpoint's Overview page lists them when you're signed in, and Iris can tell you.
Change it or turn it off
Change. On the Overview page, open the Proxy to origin server section and click Edit origin server. With the API, send PUT /v1/endpoints/{uuid}/proxy with enabled: true: a change replaces every origin field, so send every field. A line you leave out is removed, and an SSL check you leave out goes back to Encrypt only.
Turn off. Turn off the section's switch: “This endpoint becomes an agent endpoint again. Your server details are removed.” With the API, send {"enabled": false} to the same call.
ngris api endpoints set-proxy <endpoint_uuid> --enabled false
Health checks
Health checks work on a proxy endpoint through its HTTP line: ngris checks your server from its own network, with the settings of Endpoint Health. A proxy endpoint with only TCP or UDP lines can't be checked: its Overview page says Health checks need an HTTP line, turning them on is refused, and saving the server without an HTTP line turns them off.
When your server can't be reached
- Visitors get
502: “This site's server could not be reached. Please try again in a few moments.” The request is in the traffic log with noorigin_status. Check that your server is running and answers on that port from the internet and, with Strict, that its certificate is for the endpoint's hostname. - Visitors get
508: “This request was stopped because it looped back to this site.” The request came back to ngris: point the endpoint at your server itself. - In the traffic log, the requests ngris forwarded to your server have the firewall action
proxy_origin.
What it won't do
- Public servers only. Your server needs a public IP address or hostname; a private or reserved address is refused. For a server in a private network, use an agent endpoint.
- TCP and UDP need a dedicated port. Without one, that protocol isn't forwarded.
- For TCP and UDP, your server sees ngris's address, not the visitor's. Web requests carry the visitor's address in
X-Forwarded-For. - One server per endpoint. An endpoint forwards to one server address; ngris doesn't spread its traffic across several.
- Your server stays reachable at its own address. ngris doesn't hide or lock it. Someone who goes to it directly doesn't pass the endpoint's sign-in, firewall rules or rate limits.
- No ownership check. ngris doesn't check who runs the server you name: point an endpoint only at a server you run or may send traffic to.
- No agent, no routing rules, no app. Routing rules aren't used on a proxy endpoint, which forwards every request to your server, so its menu has no Routing Rules page; an app can't use it either. To serve the endpoint with an agent or an app, or to use routing rules, turn the proxy off first.
In the API, CLI and MCP
- The API: POST /v1/endpoints with
serving_mode: "proxy", PUT /v1/endpoints/{uuid}/proxy, and POST and DELETE /v1/endpoints/{uuid}/ports/{protocol} for the dedicated ports.GET /v1/endpoints?serving_mode=proxylists your proxy endpoints. - The CLI:
ngris api endpoints create --serving-mode proxy,set-proxy,add-portandremove-port(see ngris api). - MCP: the MCP server's endpoint tools.