Skip to content

Egress and proxies

Node's global fetch ignores HTTPS_PROXY unless a dispatcher is installed. Every provider call goes through fetch — the Anthropic SDK, the OpenAI SDK, and the plain calls in tools — so on a network that requires an outbound proxy, moxxy used to fail at the first request with an opaque network error, and no setting could fix it.

That made it undeployable in most corporate environments regardless of anything else in this section.

The default: read the environment

A global undici dispatcher is installed at startup from http_proxy, https_proxy and no_proxy. Nothing to configure if your environment already carries them.

sh
export https_proxy=http://proxy.example.internal:3128
export no_proxy=.example.internal,localhost
moxxy doctor

Pinning it in config

yaml
network:
  proxy: http://proxy.example.internal:3128
  noProxy: .example.internal,localhost

network.proxy takes:

ValueMeaning
envthe default. Read http_proxy / https_proxy / no_proxy.
offdirect connections, even if the environment sets a proxy.
a URLforce that proxy regardless of the environment.

Pinning a URL and locking it is how you stop a user routing around the proxy by clearing their shell profile:

yaml
locked:
  - network.proxy

network.noProxy is merged with the environment's no_proxy rather than replacing it, so pinning the proxy does not silently drop a bypass rule a machine already needed.

NO_PROXY semantics

The de-facto rules, implemented precisely:

  • * bypasses everything.
  • A leading dot covers a domain and its apex: .example.com matches api.example.com and example.com.
  • A :port qualifier restricts the rule to that port.
  • A bare IPv6 literal is not mistaken for host:port. Brackets are required for a port, exactly as in a URL.

One deliberate omission: http_proxy is not a fallback for https origins. A plaintext-only proxy cannot silently swallow TLS traffic.

TLS interception and internal CAs

When the proxy terminates TLS with an internal certificate authority, set:

sh
export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/corp-root.pem

Node reads that at startup, so it cannot be set from moxxy's config. Put it in the service unit, the container image, or the shell profile you ship. The enterprise profile mentions it in a comment for that reason.

Failure behaviour

undici is imported dynamically and only when a proxy is actually configured, so a host without one pays nothing and @moxxy/sdk keeps no hard runtime dependency on it.

A missing package or an unparseable proxy URL degrades to direct connections plus a warning, never a failed boot. A tool that cannot start is worse than one that starts and tells you what it could not do.

Checking it

sh
moxxy doctor

doctor reports the resolved proxy configuration alongside provider reachability, which is usually enough to tell a proxy problem from a credentials problem.

Next

Open source · self-hosted · MIT