Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 20, 2023. It is now read-only.
/gh-netPublic archive

A network bridge between a Codespace and a local machine.

NotificationsYou must be signed in to change notification settings

github/gh-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪The extension is currently in the Preview stage, so some hiccups are expected. Please help us to improveby submitting feedback!

image

ThisGitHub CLI extension allows you to bridge the network between a Codespace and your local machine, so theCodespace can reach out to any remote resource that is reachable from your machine. In other words, it uses your local machine as a networkgateway to get to those resources.

For instance, if you are using aVPN 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.

About GitHub CLI.

Prerequisites

  1. This extension requiresGitHub CLI versionv2.8.0 and up. Please make sureto upgrade it.

  2. If using GitHub CLI <2.13.0 only. The extension relies ongh codespace ssh command to establish SSH tunnel to a Codespace. If you useGitHub CLI >=2.13.0 theSSH config is created automatically for all your Codespaces, otherwise followSSH setup instructions.

  3. If your Codespace uses a non-default image, ensure that both theGitHub CLI,openssh-server, andsudo are installed inside the codespace. Some distros need anssh group too. Please seelinux dependencies doc for per-distro instructions.

Installation

gh extension install github/gh-net

Usage

To start network forwarding from a Codespace to a local machine, run:

gh net

Note: on Windows, you need to use a command prompt launched with Administrator privileges.

Connection issues? Please see#9 andSSH setup doc for some of the known solutions.

The command will first open a Codespace selection dialog:

image

Select a codespace and press enter. The extension will connect to selected codespace and start forwarding network traffic:

image

There are two panels in the connected view of the extension:

  • 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 orICMP) or unsuccessfulTCP connections, the records are cleaned up after a delay; hence those may show up in the list for some time.
  • Panel on the right (DNS) shows the resolvedDNS records, ashostname,record, andtime-to-live (TTL) values.

Pressq orctrl + c to stop the extension.

CLI Options

  • --gui(-g): Enable/disable GUI mode. [true |false] [default:true]
  • --trace(-t): Specify tracing verbosity. [none |trace |debug |info |warn |error] [default:info]
  • --trace-dest: Specify tracing destination file. [file name] [default:none]
  • --dns(-d): Enable/disable DNS resolution. [true |false] [default:true]
  • --codespace(-c): Codespace name to connect to. [codespace name] [default:none]
  • --telemetry: Enable/disable sending diagnostics telemetry (noPII data is sent). [true |false] [default:true]

Rungh net -h for details.

Supported platforms

Mac OSx

OSIntel chipApple chip
Big Sur (v11)✅ *
Monterey (v12)✅ *

Windows

ArchitectureAMD64
Windows 10
Windows 11

Linux

DistroLocalInside Codespace
Ubuntu
Debian
Fedora
Red Hat
Mint
OpenSUSE
Centos
Kali
Arch
Alpine✅ *

Supported Linux architectures

ArchitectureStatus
AMD64
ARM64
ARMv6
ARMv7

Tested VPN Clients

NameStatus
Viscocity
GlobalProtect
NordVPN
Tailscale

Legend: ✅ - supported 🏃 - in progress? - unknown / not tested


For list of supported network protocols refer tothis doc.

Troubleshooting

Useful links

About

A network bridge between a Codespace and a local machine.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp