Note
This project aims to be a replacement for the no longer maintained as described GH CLI Extension for access to remote resources in GitHub documentation.
Send chosen internet traffic through your GitHub Codespace with sshuttle
(download), and optionally open a reverse SSH tunnel so the Codespace can reach services running on targeted local/private networks.
Image: gh cs-proxy connect my-codespace --gateway
gh extension install appatalks/gh-cs-proxy
chmod +x ~/.local/share/gh/extensions/gh-cs-proxy/gh-cs-proxy
gh cs-proxy connect <codespace-name> [flags]
`--all` Route all traffic (0.0.0.0/0) through the Codespace
`--only-443` Route only HTTPS/TLS traffic (0.0.0.0/0:443)
`--dns` Include DNS queries in the tunnel
`--domains "..."` Route HTTPS traffic for specific domains (space-separated list)
`--gateway` Set up a reverse SSH tunnel so the Codespace can reach your localhost (default local:8000 → remote:9000)
`-h`,`--help` Show usage
gh cs-proxy help
Usage: gh cs-proxy connect <codespace-name> [--all] [--dns] [--only-443] [--domains "domain1 domain2"] [--gateway]
- Route only TLS + DNS:
gh cs-proxy connect my-codespace --only-443 --dns
- Route GitHub domains + set up local gateway:
gh cs-proxy connect my-codespace --domains "github.com api.github.com" --gateway
- Route all traffic:
gh cs-proxy connect my-codespace --all
- Custom local port mapping (optionally, use env vars before running):
export LOCAL_PORT=3000 REMOTE_PORT=9001
gh cs-proxy connect my-codespace --gateway