Skip to content

Network exits ​

A network exit is a computer of your workspace, such as a Mac, an Orange Pi or a mini PC at an office, that carries chosen outbound connections of your applications through its own internet connection. The destination sees that computer's public address instead of your server's. Uses: a partner API that only admits a known address, a stable address for an office or a branch, checking a site from another provider.

The device dials out to Orbit and keeps one connection open, so nothing is opened on it or on its router. Applications reach it through a proxy address that only works inside the cluster, and only to the destinations you allow.

What it is not: there is no address rotation and no shared pool of devices. Devices belong to one workspace.

What you need ​

  • A Mac with Apple silicon, or a Linux computer on ARM or x86 with systemd (Debian, Ubuntu, Armbian, Raspberry Pi OS and similar).
  • The device reaches your console's address over HTTPS.
  • An owner or admin of the workspace adds the device and makes the grants.

The agent is a single binary of about 6.5 MB. Idle it holds about 8 MB of memory on Linux and 12 MB on a Mac, and each open connection costs well under 100 KB.

Your first exit, step by step ​

Network exits → Step by step walks you to a working exit one decision at a time, and saves your place on the server: you can start on a laptop and continue on your phone, at the store, exactly where you stopped. The page also offers to continue a guide you left halfway.

  1. Which internet should your application use? Your home's, your office's, or I just want to see how it works, which shows a simulation of the path and of a test result, marked as simulated, with nothing to install.
  2. Do you have a computer that can stay on all the time? A Mac, a Linux computer, or not yet.
  3. Without one, choose how to get it: reuse an old laptop or desktop, buy a ready mini PC (an Intel N100 or N150 with 8 GB of RAM and a 128 GB SSD is plenty), or assemble an Orange Pi 5 or Raspberry Pi 5. Each choice shows what to ask for at the store and why, as a list you check off.
  4. Get it ready: keep a Mac awake and starting after a power failure, or install the system on a Linux computer and plug in the network cable.
  5. Connect it: the guide makes the pairing command and moves on by itself once the device is online.
  6. Test it: Test exit shows the address destinations will see.
  7. From the last screen, Make a grant opens the grant form for a project.

It takes six screens with a computer at hand and eight without one. Measured on a Debian 13 arm64 computer with systemd, on the same network as Orbit, the Linux command installed, paired and started the agent in under a second, and the device was online right after; over the internet, downloading the 6.5 MB agent adds a few seconds on a home connection.

Add a device ​

  1. Open Network exits → Add device, give it a name and choose Make the command.
  2. Choose where it runs and run the command the console shows in the device's terminal. It works once, within an hour.
    • Linux installs a systemd service under its own unprivileged user, orbit-egress, with its binary and key in /var/lib/orbit-egress (only that user can read them). It starts at boot and asks for sudo once if you are not root. journalctl -u orbit-egress shows what it does.
    • Mac, at login installs a launchd agent in ~/.orbit-egress that starts when you sign in, with no sudo.
    • Mac, at boot starts before anyone signs in and comes back by itself after a restart. It asks for the Mac's password once.
  3. The command downloads the agent from your Orbit and checks its SHA-256 before running it, then trades the one-time token for the device's own key.
  4. The device shows Online, with its system, agent version, open connections and traffic of the last hour.

Test the exit ​

On the device's page, Test exit makes a connection through the device to your Orbit's own public address, the way an application's connection leaves, and shows the address that destination saw, the device and how long it took. If it fails, the page says why: the device is offline, paused or revoked, it could not find or reach the address, or the address is on a network the device keeps off. If Orbit itself sits behind a load balancer that replaces the address of whoever connects, the test says so instead of showing that internal address: the exit works, Orbit just cannot see what destinations see. Since 0.2.48 Traefik listens on the servers' ports 80 and 443 itself, so a standard Orbit installation sees the real address.

Let a project use it ​

A grant lets a project's applications leave through chosen devices, to the destinations listed and nowhere else.

  1. Under Grants, choose New grant, pick the project, name the grant, check one or more devices and add the destinations.
  2. A destination is a host and a port: an exact name (api.partner.com:443), an address (203.0.113.7:8443) or a leading wildcard (*.partner.com:443, which covers every name below partner.com and not partner.com itself).
  3. With more than one device, each connection goes to the least busy device that is online.

Use it from an application ​

  1. In the application, open Variables. Under Network exits for this project, pick the grant, keep the name HTTPS_PROXY or change it, and choose Use the exit.
  2. Apply the change and deploy.

At deploy time the reference becomes the application's own proxy address, http://<application>:<credential>@orbit-egress.orbit-system.svc:3128. The credential belongs to that application alone and is derived from the grant, so removing the grant revokes it at once.

Give it to the HTTP client that should leave through the device. Most clients read HTTPS_PROXY, but then every HTTPS call of the application goes to the proxy and anything outside the grant gets 403. To send only some calls, set it on that client:

python
import os
import requests

proxy = os.environ["HTTPS_PROXY"]
requests.get("https://api.partner.com/v1/orders", proxies={"https": proxy})
js
import { ProxyAgent, fetch } from "undici";

const dispatcher = new ProxyAgent(process.env.HTTPS_PROXY);
await fetch("https://api.partner.com/v1/orders", { dispatcher });

HTTPS stays encrypted from the application to the destination: the device and Orbit carry bytes and never see the content.

What the application gets back ​

SituationAnswer to CONNECT
The destination is outside the grant403
The credential is unknown or belongs to another application407
No device of the grant is online, or all are paused503
The device could not reach the destination502
The device did not open the connection within 10 seconds504

Nothing ever falls back to the server's own address.

Protections ​

  • The device resolves names itself and refuses its own network: loopback, private, link-local, carrier-grade shared and reserved ranges. An application granted a partner's API never reaches the router, a printer or another machine next to the device.
  • The proxy only answers inside the cluster. A request that comes through the console's public address is turned away.
  • The agent updates itself when Orbit updates, checking the checksum Orbit announces, and waits for open connections to end before restarting.

Pause, revoke and remove ​

  • Pause closes the device's connections at once; new ones get 503 until you resume. The agent stays connected, so resuming takes effect at once.
  • Revoke makes Orbit refuse the device's key at once and disconnects it. The device stays listed; New pairing command brings it back.
  • Remove deletes the device and takes it out of every grant. The agent stays installed on the device until you remove it there:
    • Linux: sudo systemctl disable --now orbit-egress && sudo rm -rf /etc/systemd/system/orbit-egress.service /var/lib/orbit-egress && sudo userdel orbit-egress
    • Mac: launchctl bootout gui/$(id -u)/com.getcortexlabs.orbit-egress; rm -rf ~/Library/LaunchAgents/com.getcortexlabs.orbit-egress.plist ~/.orbit-egress (for an agent installed at boot, sudo launchctl bootout system/com.getcortexlabs.orbit-egress and remove /Library/LaunchDaemons/com.getcortexlabs.orbit-egress.plist).

Orbit by Cortex Labs