Skip to main content

How proxies work

A proxy is an HTTPS endpoint paired with a domain. It terminates TLS and forwards traffic to a port on your machine. No certificate setup required. Every machine automatically gets a default proxy at name.boxd.sh, forwarding to port 8000:
https://myapp.boxd.sh  ->  your machine, port 8000 (default)
You can create additional subdomain proxies, each with its own domain, pointing to different ports:
https://api.myapp.boxd.sh  ->  your machine, port 3001
https://ws.myapp.boxd.sh   ->  your machine, port 8080
DNS records are created automatically when the machine boots. Records have a 60-second TTL.

View your proxies

ssh boxd.sh proxy list
Filter by machine:
ssh boxd.sh proxy list --vm=myapp
Each proxy shows its paired domain:
[
  {
    "name": "default",
    "vm": "myapp",
    "domain": "myapp.boxd.sh",
    "port": 8000
  },
  {
    "name": "api",
    "vm": "myapp",
    "domain": "api.myapp.boxd.sh",
    "port": 3001
  }
]

Create a subdomain proxy

Each subdomain proxy gets its own domain at subdomain.vmname.boxd.sh:
ssh boxd.sh proxy new api --vm=myapp --port=3001
This creates the domain api.myapp.boxd.sh and forwards HTTPS traffic to port 3001 on your machine. From inside the VM:
boxd proxy new api --port=3001

Remove a proxy

ssh boxd.sh proxy delete api --vm=myapp
This removes the proxy and its associated subdomain. Alias: proxy rm.

Change the default port

ssh boxd.sh proxy set-port --vm=myapp --port=3000
Or from inside the VM:
boxd proxy set-port --port=3000

Custom domains

Custom domain binding is not yet available. Contact the Azin team if you need a custom domain mapped to your machine.