Skip to content

appatalks/gh-cs-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-cs-proxy

GitHub Cli Extension: Proxy-Gateway & VPN for Codespaces

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.

--gateway

Image: gh cs-proxy connect my-codespace --gateway


Installation

gh extension install appatalks/gh-cs-proxy
chmod +x ~/.local/share/gh/extensions/gh-cs-proxy/gh-cs-proxy

Usage

gh cs-proxy connect <codespace-name> [flags]

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]

Examples

  1. Route only TLS + DNS:
gh cs-proxy connect my-codespace --only-443 --dns
  1. Route GitHub domains + set up local gateway:
gh cs-proxy connect my-codespace --domains "github.com api.github.com" --gateway
  1. Route all traffic:
gh cs-proxy connect my-codespace --all
  1. Custom local port mapping (optionally, use env vars before running):
export LOCAL_PORT=3000 REMOTE_PORT=9001
gh cs-proxy connect my-codespace --gateway

Appa's Thoughts: Epic.

About

GitHub Cli Extension: Proxy-Gateway & VPN for Codespaces

Topics

Resources

License

Stars

Watchers

Forks

Languages