CLI reference
One binary, addtothese, na everything wey you need: log in, open tunnels and forward TCP ports. Your login dey stored for ~/.addtothese/config.yaml (%USERPROFILE%\.addtothese\config.yaml for Windows).
addtothese login
addtothese login --token att_...
E dey save API token. If you no put --token, e go ask for di token for standard input. addtothese logout go forget am.
addtothese http
addtothese http <port|host:port|url> [--subdomain name]
E dey expose local HTTP service. If you no put --subdomain, you go get random endpoint. If you put am, di tunnel go use name wey you reserve for di dashboard. Di CLI dey reconnect by imsef after network drop and e dey refresh im credentials before dem expire.
| Flag | Default | Meaning |
|---|---|---|
| --subdomain | random | Reserved name to use |
| --timeout | 10s | Timeout to forward each request go your service |
| --access-log | true | Print every request wey pass through di proxy |
| --log-level | warn | debug, info, warn or error |
Protect URL with email codes
addtothese http 4321 --allowed-email ana@gmail.com --allowed-email '*@company.com'
Na only the people wey you list fit open the URL. Visitor go enter their email; if e dey the list, dem go receive 6-digit code wey go work for 10 minutes, and dem go stay signed in for 24 hours. *@company.com dey allow one whole domain. Repeat the flag for every address or domain.
Your service go receive the verified address for the X-AddToThese-Email header. Every run dey replace the list, so if you run am without --allowed-email the URL go become public again. You fit also edit the list for the endpoint page for the dashboard.
addtothese tcp
addtothese tcp 5432 --subdomain mydb
E dey expose raw TCP port like Postgres, SSH or RDP. People wey need reach am go run di forwarder for dia side, wey go open local port wey connect to your service:
addtothese forward tcp 5432 mydb --connect.url https://mydb.addtothese.com
Dem fit then connect to localhost:5432 as if di database dey dia own machine.
Environment variables
| Variable | Meaning |
|---|---|
| ADDTOTHESE_TOKEN | API token, e dey override di one wey you save |
| ADDTOTHESE_CONFIG | Path to another config file |