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 successful update saves the configuration and puts it in force immediately. network stop disables the configured route or block policy without deleting it; network start re-enables a stopped policy.

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" \
--dns-servers "1.1.1.1,1.0.0.1"

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)

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. Updating to block mode switches outbound access off; network stop switches it back on.


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.

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 malicious packages
  • Exfiltrate data

Even if the code is compromised, it stays isolated.

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

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 saves and activates the VPN route.

Step 2: Allow only HTTPS through the firewall:

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.

The three layers:

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

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 exit IP with curl ifconfig.me from inside the container, test app connectivity, then apply 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. Configure custom DNS:
PATCH Configure SOCKS5 with custom DNS servers
/api/v1/containers/{container_id}/network
Click "Run" to execute the request
  1. 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. Special characters are URL-encoded (@ = %40, : = %3A)
  3. The VPN subscription is active
  4. Test from the host: 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 leaves no outbound internet path