Skip to content
Hoody.com

This page covers outbound traffic: where your container’s connections exit to the internet. You route them through a SOCKS5, HTTP, or HTTPS proxy, or block them entirely. The route is applied on the host, so nothing inside the container is configured.


Complete endpoint documentation:


Hoody uses the word proxy for two systems that work in opposite directions:

SystemDirectionPurpose
Hoody ProxyInternet → ContainerMakes services accessible via URLs
Network Configuration (this page)Container → InternetChanges exit IP address

Hoody Proxy is how other people reach your containers, inbound. Network Configuration is how your container reaches the internet, outbound. The two run alongside each other: the proxy handles inbound service requests, network configuration handles outbound connections.


A new or changed update configures the route and starts it in the same call; the response reports status: "running". Repeating an unchanged configuration keeps the route’s current state and can answer configured without starting it, so use network start to bring a stopped route back. network stop disables the configured route or block policy without deleting it, and network start switches it back on. The dns_servers field is accepted for compatibility but not applied: containers resolve names through the host’s resolver, and the API reports ["1.1.1.1", "8.8.8.8"] whatever you send.

Routes all TCP traffic through the SOCKS5 upstream:

Terminal window
# Route all container traffic through SOCKS5 proxy
hoody network update --container $CONTAINER_ID \
--type socks5 \
--proxy "socks5://username:password@proxy.example.com:1080"

What happens:

  • All container TCP connections route through the SOCKS5 proxy
  • The container appears to originate from the proxy’s IP
  • Authentication is supported (username:password)

Rules for the proxy address (all three types):

  • Write it as scheme://[username:password@]host:port. The scheme may be left out (type supplies it); if you write one, it must match type. A mismatch such as socks5://… with type: "http" is refused with 400.
  • The port is required: a plain number from 80 to 65535, with no leading zero.
  • The host is a hostname or a plain IPv4 address such as 203.0.113.10; IPv6 addresses and other number forms (0x…, leading zeros) are refused.
  • The username may contain only letters, digits, _ and -; the password may also contain :.
  • Anything after the port (a path, ?query or #fragment) is dropped.
  • To change only the address, send it without credentials: the saved username and password are kept when the scheme, host and port stay the same, and dropped when any of them changes.

Why SOCKS5 is recommended:

  • It forwards any TCP protocol natively, without CONNECT tunneling
  • SSH, databases, Git, and custom protocols all work
  • Many providers, including VPN services, offer SOCKS5 with credentials
  • Nothing inside the container needs configuring
Terminal window
# Route container traffic through HTTP proxy
hoody network update --container $CONTAINER_ID \
--type http \
--proxy "http://user:pass@corporate-proxy.com:8080"

Use for: Corporate proxy requirements, environments that mandate an HTTP forward proxy

Note: type: http configures the upstream as an HTTP proxy. Hoody still DNATs all container TCP egress through it, using the proxy’s CONNECT tunneling for non-HTTP destinations, so this is not limited to plain HTTP payloads. SOCKS5 remains the most broadly compatible upstream.

Terminal window
# Route container traffic through HTTPS proxy
hoody network update --container $CONTAINER_ID \
--type https \
--proxy "https://user:pass@secure-proxy.com:443"

Use for: Encrypted HTTP proxy connections

Note: type: https configures the upstream as an HTTPS proxy (CONNECT tunneling); all TCP egress is DNATed through it just as with the http type, so this is not restricted to HTTPS payloads.

Terminal window
# Block all outbound internet traffic
hoody network update --container $CONTAINER_ID --type block

Block mode blocks all outbound internet. The container can still:

  • Be accessed via Hoody Proxy URLs (terminal, files, display)
  • Access localhost services and /ramdisk

It cannot make any outbound internet connections.

Use block mode for a workload that has no business talking to the internet. Outbound access is off as soon as the block configuration is applied; network stop switches it back on and network start switches it off again.


Without it, each application carries its own proxy setting:

Terminal window
export HTTP_PROXY=http://proxy:8080
npm config set proxy http://proxy:8080
git config http.proxy http://proxy:8080
# Every single application needs its own setting

On Hoody, one update call covers every application in the container:

Terminal window
# Configure SOCKS5 proxy for all container traffic
hoody network update --container $CONTAINER_ID \
--type socks5 \
--proxy "socks5://user:pass@proxy.example.com:1080"

Every application then routes through SOCKS5: npm downloads, curl requests, Python/Node.js/Go apps, SSH connections, and database connections. None of them carry a proxy setting.

What that gives you:

  • Universal routing, covering every TCP protocol
  • No application-level configuration
  • Tamper-proof routing, since the container cannot bypass it
  • Easy VPN provider switching

Change the exit IP for a geo-restricted API

Section titled “Change the exit IP for a geo-restricted API”

Your server is in Germany, but the API requires a US IP:

Terminal window
# Route through US proxy for geo-restricted APIs
hoody network update --container $CONTAINER_ID \
--type socks5 \
--proxy "socks5://user:pass@us-proxy.example.com:1080"

Requests from the container now appear to originate from the proxy’s location.

Terminal window
# Route through corporate HTTP proxy for compliance
hoody network update --container $CONTAINER_ID \
--type http \
--proxy "http://employee:pass@corporate-proxy.com:8080"

All HTTP traffic is logged by the corporate proxy for compliance.

Restrict an AI workload’s outbound network access

Section titled “Restrict an AI workload’s outbound network access”
Terminal window
# Block all outbound traffic for AI sandbox
hoody network update --container $CONTAINER_ID --type block

In block mode, AI-generated code cannot:

  • Call external APIs
  • Download packages
  • Open outbound connections of its own

DNS queries still reach the host resolver, which the block rules leave open, so this is not a guarantee against every exfiltration channel.

Spawn containers with different exit IPs and run the same request from each:

PATCH Configure US region proxy
/api/v1/containers/{container_id}/network
Click "Run" to execute the request
PATCH Configure EU region proxy
/api/v1/containers/{container_id}/network
Click "Run" to execute the request
PATCH Configure Asia region proxy
/api/v1/containers/{container_id}/network
Click "Run" to execute the request

A PATCH that changes the configuration replaces the previous route and starts the new one; there is no separate activation step. A PATCH that repeats the current configuration keeps the route’s current state, so use network start to bring a stopped route back.


Layering network, firewall, and permissions

Section titled “Layering network, firewall, and permissions”

Three layers control traffic, and they stack.

Step 1: Route through the VPN:

PATCH Route all traffic through VPN
/api/v1/containers/{container_id}/network
Click "Run" to execute the request

A successful PATCH applies the VPN route as soon as it returns.

Step 2: Block the rest of the TCP range. Drops are evaluated before allows, so the drop has to leave out port 443 rather than cover 1-65535:

POST Allow HTTPS traffic (port 443)
/api/v1/containers/{container_id}/firewall/egress
Click "Run" to execute the request
POST Block all other TCP traffic
/api/v1/containers/{container_id}/firewall/egress
Click "Run" to execute the request

Result: traffic routes through the VPN, and the firewall permits only HTTPS among TCP traffic; add separate UDP and ICMPv4 deny rules if those protocols must also be blocked.

The three layers:

LayerControlsPage
Network ConfigExit IP routing (outbound)This page
FirewallPacket filtering (ingress/egress)Firewall →
Proxy PermissionsHTTP service access (inbound)Permissions →

Inside the container there is an optional fourth layer. An optional program sandbox restricts one daemon program. Under network.mode: restricted Landlock limits the TCP ports it may bind and connect to, for every destination including loopback and the platform address, but not UDP or destination hosts, and refuses MPTCP, io_uring and TCP Fast Open sends so those limits cannot be bypassed; mode: none removes its external networking, UDP included, while Unix sockets reachable by path stay reachable. Setting network.udp: "deny" stops the program from creating UDP sockets under any mode. Separately, its ingress rules filter IPv4 TCP arriving on eth0 at its declared ports. By default those rules let packets whose source is loopback or the gateway through, which covers callers inside the container and the platform’s own calls from the gateway. A public request forwarded by the proxy keeps the client’s own address, and one another container sends to the program’s public URL arrives from the server’s address, so both are filtered.

Use all three together to control exit routing, packet filtering, and HTTP service access.


Terminal window
# View current network configuration
hoody network get --container $CONTAINER_ID
Terminal window
# Remove network config, restore direct connection
hoody network delete --container $CONTAINER_ID --yes
Terminal window
# Start network proxy/blocking
hoody network start --container $CONTAINER_ID
# Stop network proxy/blocking
hoody network stop --container $CONTAINER_ID --yes

From inside the container:

Terminal window
# Via hoody-terminal
curl ifconfig.me
# Should show VPN IP, not server IP

Hoody DNATs all container TCP egress regardless of proxy type, but a SOCKS5 upstream natively forwards any TCP protocol (SSH, databases, custom protocols) without relying on CONNECT tunneling. Use SOCKS5 unless your environment specifically requires an HTTP/HTTPS forward proxy.

Test in a dev container first:

PATCH Test proxy configuration in dev container
/api/v1/containers/{container_id}/network
Click "Run" to execute the request

Verify the exit IP with curl ifconfig.me from inside the container, test app connectivity, then apply the same configuration to production.

Terminal window
# Good comment
{"comment": "UK VPN for BBC API - geo-restricted content"}
# Vague comment
{"comment": "vpn"}

Route through the VPN, then restrict the allowed destinations with firewall rules.


Does Network Configuration affect container service URLs?

Section titled “Does Network Configuration affect container service URLs?”

No. Hoody Proxy service URLs (terminal, files, display) remain accessible. Network Configuration only affects outbound connections from the container.

What happens if the SOCKS5 proxy goes down?

Section titled “What happens if the SOCKS5 proxy goes down?”

The container cannot make outbound connections. Update the config with a different proxy, or call DELETE /network to revert to a direct connection.

Can I use multiple proxies simultaneously?

Section titled “Can I use multiple proxies simultaneously?”

Network Configuration takes one proxy per container. For multi-hop, configure the first SOCKS5 through Network Configuration and run a second SOCKS5 client inside the container. You can also spawn multiple containers, each with a different proxy.

Not yet. Network Configuration currently supports SOCKS5, HTTP, and HTTPS proxy routing only. WireGuard routing is planned for a future update. Many VPN providers offer SOCKS5 endpoints as an alternative.

For a real WireGuard tunnel, run the client inside the container instead. That path is yours to configure, and it comes with rules of its own. See VPN Inside a Container →.

No. Changes apply immediately to new connections. Existing connections may continue using the old route.

Can containers communicate with each other in block mode?

Section titled “Can containers communicate with each other in block mode?”

No. Block mode blackholes all new outbound TCP from the container, including connections to other containers’ service URLs, which resolve to public addresses. The blocked container itself stays reachable from outside via its own service URLs; it just can’t dial out. If two containers need to talk while one is blocked, have the unblocked one initiate the connection.


No internet access after configuring the VPN

Section titled “No internet access after configuring the VPN”

Solutions:

  1. Verify the network service is running: GET /containers/{id}/network → check "status": "running"
  2. Test proxy from host: curl --proxy socks5://user:pass@vpn.com:1080 https://ifconfig.me
  3. Check proxy URL format: socks5://username:password@host:port
  4. Remove config and test direct: DELETE /containers/{id}/network

Solutions:

  1. Custom DNS is not the fix: the dns_servers field is accepted but not applied, and containers resolve through the host’s resolver whatever you send. If resolution fails only with a route active, check the route end to end: that the proxy or VPN endpoint is reachable and answering (test it from outside the container), that the container’s firewall lets DNS out, and that the route’s own resolver works.

  2. Ensure the firewall allows DNS:

POST Allow DNS traffic (UDP port 53)
/api/v1/containers/{container_id}/firewall/egress
Click "Run" to execute the request

Check:

  1. The credentials are correct
  2. The username uses only letters, digits, _ and -, and the password only those plus : (other characters are refused)
  3. The VPN subscription is active
  4. Test from your own computer: curl --proxy socks5://user:pass@vpn.com:1080 https://ifconfig.me

Verify:

  1. The network service is running: GET /network → check remote_status.is_running is true (or status is running)
  2. Test from container: curl ifconfig.me (should show proxy IP, not server IP)
  3. Check DNS leaks: curl -4 ifconfig.me (force IPv4)

Complete networking setup:

What this page covered:

  • Network Configuration controls outbound traffic and the exit IP
  • Hoody Proxy controls inbound traffic and service URLs
  • SOCKS5 routes any TCP protocol, which makes it the most versatile upstream
  • Routing is applied on the host, so containers need no configuration
  • Block mode drops outbound traffic except DNS to the host resolver