Network
Set the standard proxy variables and exclude loopback addresses. Rewyyn uses local HTTP connections between the CLI and its background service, so the loopback exclusion is required when a proxy is configured in the CLI environment.
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1,::1
rewyyn
HTTP_PROXY handles HTTP destinations and HTTPS_PROXY handles HTTPS destinations. The proxy URL itself can use http://
for both variables. NO_PROXY is a comma-separated list of hosts and addresses that connect directly.
Service
Shell exports affect a background service only when that service starts from the shell. Persist the variables in the managed service configuration so later service starts use the same network settings.
rewyyn service set env HTTP_PROXY http://proxy.example.com:8080
rewyyn service set env HTTPS_PROXY http://proxy.example.com:8080
rewyyn service set env NO_PROXY localhost,127.0.0.1,::1
rewyyn service start
Changing a managed environment variable stops the running service. service start starts it again with the new environment.
Keep NO_PROXY in the CLI shell too when that shell sets a proxy, because managed service variables apply to the server
process, not the CLI process.
Remove a persisted variable with service unset env:
rewyyn service unset env HTTPS_PROXY
Authentication
For a proxy that accepts URL credentials, include the username and password in each proxy URL that needs authentication.
Percent-encode characters such as @, :, and / inside either credential.
export HTTPS_PROXY='http://user:p%40ssword@proxy.example.com:8080'
For the background service, persist the complete URL. The value is stored in the private service configuration and is
shown by rewyyn service get env, so do not share that output.
rewyyn service set env HTTPS_PROXY 'http://user:p%40ssword@proxy.example.com:8080'
Certificates
Set NODE_EXTRA_CA_CERTS to a PEM file when the proxy or destination uses a certificate signed by a private certificate
authority. The extra authorities are added to the runtime trust store when the process starts.
export NODE_EXTRA_CA_CERTS=/etc/company/ca.pem
rewyyn --standalone
Persist the file path for the background service, then restart it:
rewyyn service set env NODE_EXTRA_CA_CERTS /etc/company/ca.pem
rewyyn service start
Foreground
--standalone and serve use the environment of their own process. rewyyn service set env does not configure these
processes.
HTTP_PROXY=http://proxy.example.com:8080 \
HTTPS_PROXY=http://proxy.example.com:8080 \
NO_PROXY=localhost,127.0.0.1,::1 \
rewyyn --standalone
Apply the same pattern to a foreground server:
HTTPS_PROXY=http://proxy.example.com:8080 \
NO_PROXY=localhost,127.0.0.1,::1 \
rewyyn serve
Verify
Check that the CLI can reach the background service after applying the settings:
rewyyn api get /api/info
A successful health response verifies the local client-to-service connection. Run a normal provider request to verify the service’s outbound proxy and certificate path.