Endpoints

An endpoint is a URL devgate answers on and what it does with the traffic. Endpoints differ in two ways: who runs them — an agent or devgate itself — and who can reach them — anyone, or only your other endpoints. The New Endpoint wizard in the dashboard walks through both and writes the command or creates the endpoint for you.

Agent and cloud endpoints

Agent endpoints are started by the devgate agent on the machine where your service runs. They live as long as the agent does and forward to a local port:

$ devgate http 8080 --url https://<your dev domain>

Cloud endpoints are created in the dashboard and stay up with no agent at all. They are only a Traffic Policy: redirect a domain, return a fixed response, or — most often — forward to internal agent endpoints, so restarting an agent never changes the public URL’s behaviour.

Public and internal bindings

A public endpoint answers on the internet: your dev domain, a domain you reserved, or a random URL. An internal endpoint has a URL ending in .internal, which nothing outside your account can reach; only the forward-internal action of another of your endpoints sends it traffic. See internal endpoints.

URLs

  • Random — devgate http 8080 gets a new free-… URL on every run.
  • Your dev domain — every account has one, free and permanent: --url https://<dev domain>. Endpoint hours on it are never billed.
  • Reserved domains — branded names under our zones, from Domains in the dashboard.
  • Internal — --url https://api.example.internal.
  • TCP and TLS — tcp:// and tls:// URLs, see TCP and TLS endpoints.

Two agents can share a URL when both allow it: that is pooling, and traffic is load balanced between them.

A random URL with {$random}

As on ngrok, {$random} in a URL stands for a random name: devgate picks one when the endpoint starts. Random names live on devgate-free.run and are for agent endpoints, so this is the same as leaving --url out — handy in a config file or an API call, where you want every endpoint to name its URL. Quote it on the command line, or the shell reads $random as a variable:

$ devgate http 8080 --url 'https://{$random}.devgate-free.run'

A shell that already expanded it leaves https://{}.devgate-free.run, which devgate takes the same way. Cloud endpoints are always on a domain of yours, so they don’t take a random URL.

Choosing a URL in the dashboard

In the New Endpoint wizard, Choose your URL is a field you can type in. When you focus it, it lists URLs on your dev domain and your other domains, the protocols — https://, http:// and, where available, tcp:// (with a port) and tls:// — and Random URL, which fills in https://{$random}.devgate-free.run. Typing narrows the list; picking a protocol starts the URL for you to finish.

Questions people actually ask

What is the difference between an agent endpoint and a cloud endpoint?

An agent endpoint exists while a devgate agent runs it and forwards to a service on that machine. A cloud endpoint is created in the dashboard, is always on, and has no agent: its Traffic Policy answers every request, usually by forwarding to an internal agent endpoint.

What does an internal endpoint do?

It has a *.internal URL that is not reachable from the internet. Only your other endpoints can send it traffic, with the forward-internal action — so one public URL can route to many services.