A daemon that runs on residential machines and acts as a proxy exit point for the Space Router network.
Traffic from AI agents flows through the Space Router Proxy Gateway to this Home Node, which forwards requests from a residential IP address.
AI Agent → Proxy Gateway (cloud) → Home Node (your machine) → Target website
The Home Node:
- Registers with the Coordination API on startup
- Accepts TLS-encrypted proxy connections from the Proxy Gateway
- Forwards traffic to target servers from your residential IP
- Auto-configures your router via UPnP for port forwarding
- Deregisters on shutdown
# Install dependencies
pip install -r requirements.txt
# Configure
export SR_COORDINATION_API_URL=https://spacerouter-coordination-api.fly.dev
export SR_UPNP_ENABLED=true
# Run
python -m app.main| Environment Variable | Default | Description |
|---|---|---|
SR_COORDINATION_API_URL |
http://localhost:8000 |
Coordination API URL |
SR_NODE_PORT |
9090 |
Port for incoming proxy connections |
SR_NODE_LABEL |
"" |
Human-readable label for this node |
SR_NODE_REGION |
"" |
Geographic region (e.g. us-west, KR) |
SR_NODE_TYPE |
residential |
Node type |
SR_PUBLIC_IP |
auto-detected | Public IP (auto-detected if empty) |
SR_UPNP_ENABLED |
true |
Enable UPnP port forwarding |
SR_UPNP_LEASE_DURATION |
3600 |
UPnP lease duration in seconds |
SR_TLS_CERT_PATH |
certs/node.crt |
TLS certificate path (auto-generated) |
SR_TLS_KEY_PATH |
certs/node.key |
TLS key path (auto-generated) |
SR_BUFFER_SIZE |
65536 |
TCP relay buffer size |
SR_REQUEST_TIMEOUT |
30.0 |
Connection timeout in seconds |
SR_RELAY_TIMEOUT |
300.0 |
Bidirectional relay timeout in seconds |
SR_LOG_LEVEL |
INFO |
Log level |
Install as a system service that starts at boot:
sudo cp launchd/com.spacerouter.homenode.plist /Library/LaunchDaemons/
sudo launchctl load /Library/LaunchDaemons/com.spacerouter.homenode.plistCross-platform binaries (macOS ARM64/x64, Windows x64, Linux x64) are built automatically and published as GitHub Releases.
pip install -r requirements-dev.txt
pytest tests/ -vThe Home Node communicates with two components:
Coordination API (registration):
POST /nodes— register on startupPATCH /nodes/{id}/status— set status toofflineon shutdown
Proxy Gateway (inbound proxy traffic):
- Accepts TLS TCP connections on
SR_NODE_PORT - Handles
CONNECT host:portfor HTTPS tunneling - Handles
GET http://...for HTTP forwarding - Strips all
X-SpaceRouter-*andProxy-Authorizationheaders before forwarding to targets
See component-contracts.md for full specifications.