Ferdigheter · Tilgang og sikkerhet
Outbound traffic from apps
Find out which internet addresses an app may reach, get a host onto its allowlist, make the app use Skybu's outbound proxy, and diagnose an app that cannot reach an outside API.
By default an app on Skybu can connect to any public address. An organisation can instead allow only a list of hosts. An app on a list reaches the internet only through Skybu's outbound proxy, which lets the listed hosts through and stops and records everything else. Use this skill when an app calls an outside API, or cannot.
In short
get_app_egressto see the rule that applies to the app and what it was refused.- If a host the app needs is missing, an owner adds it in the dashboard. You cannot change the rule over MCP.
- On a list, the app's HTTP client must use the proxy from
HTTPS_PROXY. Many do; Node's built-infetchdoes not by default.
Step 1: the rule for the app
{ "name": "get_app_egress", "arguments": { "appId": "<app id>" } }
{
"mode": "allowlist",
"hosts": ["api.example.no"],
"organisation": { "rule": "allowlist", "hosts": ["*.googleapis.com", "api.stripe.com"] },
"effective": { "mode": "allowlist", "hosts": ["*.googleapis.com", "api.example.no", "api.stripe.com"] },
"blocked": [{ "host": "api.openai.com:443", "count": 12, "lastAt": "…" }]
}
| Field | Meaning |
|---|---|
organisation.rule | open (the default: any public address) or allowlist. |
organisation.hosts | Hosts every app on a list may reach. |
mode | The app's own choice: open, allowlist, or null to follow the organisation. |
hosts | Hosts this app may reach on top of the organisation's. |
effective | What applies now: the mode, and the organisation's hosts and the app's together. |
blocked | The last 20 hosts the app tried to reach and was refused, as host:port, with how often and when last. |
One app can stay open while the organisation uses a list, or be on a list while the rest are open. A pull request preview follows its app's rule.
Step 2: getting a host on the list
Only owners of the organisation can change where apps may connect, and only in the dashboard at https://platform.skybu.no. There is no agent tool or CLI command for it. Tell the user what to add and where:
- For this app only: the app's Settings tab, "Rule for this app" (follow the organisation, open, or allowed addresses only, with hosts of its own on top of the organisation's).
- For every app: Settings → General, "Outbound traffic".
Write the hosts the way Skybu reads them, one per line:
| Entry | Allows |
|---|---|
api.example.no | That host on ports 80 and 443. |
*.example.no | Every subdomain of example.no on ports 80 and 443, but not example.no itself; add that too if needed. |
api.example.no:8443 | That host on port 8443 only. |
Hostnames only: no IP addresses, paths or wildcards in the middle. A scheme or path is stripped (https://api.example.no/v1 becomes api.example.no). A list holds at most 100 hosts. A wrong entry is refused with invalid_egress_host.
The proxy picks up a changed list within seconds. Check effective.hosts with get_app_egress afterwards.
Step 3: the app must use the proxy
An app on a list cannot connect to the internet directly at all; only the proxy, its project's database and file storage are reachable. Skybu gives it these variables:
| Variable | Value |
|---|---|
HTTPS_PROXY, https_proxy, HTTP_PROXY, http_proxy | The proxy's address with the app's own user and password. |
NO_PROXY, no_proxy | localhost, 127.0.0.1, .svc, .cluster.local: addresses inside Skybu go direct. |
Skybu sets these itself and they replace any variables of the same name the user sets. An HTTP client that ignores them cannot connect out. Most honour them: curl, Python's requests and httpx, Go's default client. Node's built-in fetch does not, unless the app runs with NODE_USE_ENV_PROXY=1 on a Node version that supports it, or sets a proxy agent such as undici's EnvHttpProxyAgent at start-up:
import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
setGlobalDispatcher(new EnvHttpProxyAgent());
The proxy carries HTTP, and HTTPS through CONNECT. A client for another protocol to an outside server, such as a Postgres or SMTP client, cannot connect unless it can tunnel through an HTTP proxy.
Diagnosing "my app can't reach an API"
get_app_logsfor the error the app logs.get_app_egress. Ifeffective.modeisopen, Skybu does not stop the app: look at the address, the API key (skill://apps/environment-variables) or the outside service.- If the host is in
blocked, it is not on the list. Ask an owner to add it (Step 2). The proxy answered the app with403 … is not on this app's list of allowed addresses. - If the mode is
allowlist, the host is on the list, and it is not inblocked, the app most likely connects directly instead of through the proxy: timeouts or refused connections in the log. Fix the client (Step 3) and deploy again. - Other answers from the proxy:
| Answer | Meaning |
|---|---|
403 … does not resolve to a public address | The host resolves to a private address. The proxy never connects there, even when listed. |
407 Proxy authentication required | The client sent no credentials or wrong ones. Use the whole HTTPS_PROXY value, user and password included. |
429 Too many connections | The app holds too many connections through the proxy at once (200). Reuse connections. |
502 The upstream could not be reached | The host is allowed but did not answer. |
Things to know
- Refused attempts reach
blockedwithin seconds. The register (list_app_register) counts them per app for the last 30 days. - Every change to an organisation's or an app's rule is in the audit log.