{"id":13687408,"url":"https://github.com/github/gh-net","last_synced_at":"2025-10-04T07:31:19.654Z","repository":{"id":37606998,"uuid":"470373738","full_name":"github/gh-net","owner":"github","description":"A network bridge between a Codespace and a local machine.","archived":true,"fork":false,"pushed_at":"2022-09-15T21:35:01.000Z","size":89,"stargazers_count":285,"open_issues_count":32,"forks_count":21,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-09-30T00:06:08.311Z","etag":null,"topics":["cli","codespaces","gh-extension","network"],"latest_commit_sha":null,"homepage":"https://github.com/github/gh-net","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-16T00:17:23.000Z","updated_at":"2024-09-23T16:33:33.000Z","dependencies_parsed_at":"2022-07-14T08:09:38.702Z","dependency_job_id":null,"html_url":"https://github.com/github/gh-net","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgh-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/gh-net/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235227462,"owners_count":18956137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","codespaces","gh-extension","network"],"created_at":"2024-08-02T15:00:54.254Z","updated_at":"2025-10-04T07:31:14.372Z","avatar_url":"https://github.com/github.png","language":null,"readme":"## Codespaces Network Bridge\n\n🧪 *The extension is currently in the Preview stage, so some hiccups are expected. Please help us to improve [by submitting feedback](https://github.com/github/gh-net#troubleshooting)!*\n\n\u003cimg width=\"749\" alt=\"image\" src=\"https://user-images.githubusercontent.com/1478800/161617508-b65de564-60f3-46c8-8394-5b28c8ac477b.png\"\u003e\n\nThis [GitHub CLI](https://cli.github.com/) extension allows you to bridge the network between a Codespace and your local machine, so the `Codespace` can reach out to any remote resource that is reachable from your machine. In other words, it uses your local machine as a network `gateway` to get to those resources.\n\nFor instance, if you are using a `VPN` client to connect to private enterprise network to access a database or any other remote resources, this extension enables you to use those private resources from within a Codespace.\n\n[About GitHub CLI](https://cli.github.com/).\n\n## Prerequisites\n\n1. This extension requires [GitHub CLI](https://cli.github.com/) version `v2.8.0` and up. Please make sure [to upgrade it](https://github.com/cli/cli#installation).\n\n2. **If using GitHub CLI \u003c [2.13.0](https://github.com/cli/cli/releases/tag/v2.13.0) only.** The extension relies on `gh codespace ssh` command to establish SSH tunnel to a Codespace. If you use [GitHub CLI \u003e=2.13.0](https://github.com/cli/cli/releases/tag/v2.13.0) the `SSH` config is created automatically for all your Codespaces, otherwise follow [SSH setup](./docs/SSH_SETUP.md) instructions.\n\n3. If your Codespace uses a non-default image, ensure that both the [GitHub CLI](https://cli.github.com/), `openssh-server`, and `sudo` are installed inside the codespace. Some distros need an `ssh` group too. Please see [linux dependencies doc](./docs/LINUX_DEPENDENCIES.md) for per-distro instructions.\n\n## Installation\n\n```shell\ngh extension install github/gh-net\n```\n\n## Usage\n\nTo start network forwarding from a Codespace to a local machine, run:\n\n```shell\ngh net\n```\n\n\u003e Note: on Windows, you need to use a command prompt launched with Administrator privileges.\n\nConnection issues? Please see https://github.com/github/gh-net/issues/9 and [SSH setup doc](./docs/SSH_SETUP.md) for some of the known solutions.\n\nThe command will first open a Codespace selection dialog:\n\n\u003cimg width=\"749\" alt=\"image\" src=\"https://user-images.githubusercontent.com/1478800/161616184-4cd42419-6d97-440c-bf26-cb713baa7607.png\"\u003e\n\nSelect a codespace and press enter. The extension will connect to selected codespace and start forwarding network traffic:\n\n\u003cimg width=\"749\" alt=\"image\" src=\"https://user-images.githubusercontent.com/1478800/161617508-b65de564-60f3-46c8-8394-5b28c8ac477b.png\"\u003e\n\nThere are two panels in the connected view of the extension:\n\n- Panel on the left (`NAT`) shows the network address translation table for currently opened connections. For stateful protocols(e.g. `TCP`) the records are cleaned up automatically after a connection is closed, so the records will come and go as connections are established and teardown. For stateless protocols (e.g. `UDP` or `ICMP`) or unsuccessful `TCP` connections, the records are cleaned up after a delay; hence those may show up in the list for some time.\n- Panel on the right (`DNS`) shows the resolved `DNS` records, as `hostname`, `record`, and `time-to-live` (`TTL`) values.\n\nPress `q` or `ctrl + c` to stop the extension.\n\n### CLI Options\n\n- `--gui`(`-g`): Enable/disable GUI mode. [`true` | `false`] [default: `true`]\n- `--trace`(`-t`): Specify tracing verbosity. [`none` | `trace` | `debug` | `info` | `warn` | `error`] [default: `info`]\n- `--trace-dest`: Specify tracing destination file. [`file name`] [default: `none`]\n- `--dns`(`-d`): Enable/disable DNS resolution. [`true` | `false`] [default: `true`]\n- `--codespace`(`-c`): Codespace name to connect to. [`codespace name`] [default: `none`]\n- `--telemetry`: Enable/disable sending diagnostics telemetry (no `PII` data is sent). [`true` | `false`] [default: `true`]\n\nRun `gh net -h` for details.\n\n## Supported platforms\n\n### Mac OSx\n\n| OS                            | Intel chip                        | Apple chip                                                                     |\n|-------------------------------|-----------------------------------|--------------------------------------------------------------------------------|\n| Big Sur (v11)                 | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003ca href=\"https://github.com/github/gh-net/issues/22\" title=\"supported\"\u003e✅ *\u003c/a\u003e |\n| Monterey (v12)                | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003ca href=\"https://github.com/github/gh-net/issues/22\" title=\"supported\"\u003e✅ *\u003c/a\u003e |\n\n### Windows\n\n| Architecture            | AMD64 |\n|-------------------------|-----------------------------------|\n| Windows 10              | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Windows 11              | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n\n### Linux\n\n| Distro                  | Local                             | Inside Codespace                 |\n|-------------------------|-----------------------------------|----------------------------------|\n| Ubuntu                  | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Debian                  | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Fedora                  | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Red Hat                 | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Mint                    | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| OpenSUSE                | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Centos                  | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Kali                    | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Arch                    | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Alpine                  | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e | \u003ca href=\"https://github.com/github/gh-net/issues/12\" title=\"supported\"\u003e✅ *\u003c/a\u003e |\n\n#### Supported Linux architectures\n\n| Architecture            | Status                            |\n|-------------------------|-----------------------------------|\n| AMD64                   | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| ARM64                   | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| ARMv6                   | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| ARMv7                   | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n\n## Tested VPN Clients\n\n| Name                    | Status                            |\n|-------------------------|-----------------------------------|\n| Viscocity               | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| GlobalProtect           | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| NordVPN                 | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n| Tailscale               | \u003cspan title=\"supported\"\u003e✅\u003c/span\u003e |\n\n\u003cbr /\u003e\n\nLegend: ✅ - supported 🏃 - in progress `?` - unknown / not tested\n\n\u003cbr /\u003e\n\nFor list of supported network protocols refer to [this doc](./docs/SUPPORTED_NETWORK_PROTOCOLS.md).\n\n## Troubleshooting\n\n- Something is missing? Please create a [✨ feature request](https://github.com/github/gh-net/issues/new?assignees=\u0026labels=enhancement\u0026template=feature_request.md\u0026title=).\n- Something is incorrect? Please create a [🐛 bug report](https://github.com/github/gh-net/issues/new?assignees=\u0026labels=bug\u0026template=bug_report.md\u0026title=).\n- For known issues, refer to [👉 this list](https://github.com/github/gh-net/issues?q=is%3Aissue+is%3Aopen+label%3Aknown-issue).\n\n## Useful links\n\n- [How it works](./docs/HOW_IT_WORKS.md)\n- [About GitHub CLI](https://cli.github.com/)\n- [About GitHub Codespaces](https://github.com/features/codespaces)\n- [🔒 Source code](https://github.com/github/codespaces-vpn-gateway)\n","funding_links":[],"categories":["Github tools","Others","cli","Github"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fgh-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgh-net/lists"}