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

31 Commits
 
 
 
 
 
 
 
 

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

image

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

For instance, if you are using aVPN to connect to your enterprise network to access a database or any other remote resources on the private network, this extension allows you to get to those resources from within a Codespace, so that you can develop fully inside a Codespace!

About GitHub CLI.

Installation

This extension depends on the latest features of GitHub CLI(>= v2.8.0), please make sureto upgrade it.

How to check if my version works? Run `gh codespace select` command, if it opens the codespace selection dialog, you are good to go!image

Mac OSx:

gh extension install github/gh-net

Linux:

sudo gh extension install github/gh-net

Thesudo is required during extension installation on Linux due tocli/cli#5456. Hopefully it won't be the case in the future.

⚠️ If your Codespaces use non-default image, make sure thatGitHub CLI and SSH server are installed inside the Codespaces. It might be as simple as adding"github-cli": "latest" and"sshd": "latest" todevcontainer.json file!

Usage

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

sudo gh net start

Note:sudo privileges are required to bind to network sockets on your machine.

This will provide 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 pannels 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 connection is closed so the records will come and go as connection is established and closed. For stateless protocols (e.g.UDP orICMP) or unsuccessfulTCP connections the records are cleaned up after some time, so those will 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: Enanble/disable GUI mode. [true |false] [default:true]
  • --trace-level: Specify tracing verbosity. [none |trace |debug |info |warn |error] [default:info]

Rungh net start -h for details.

Supported platforms

Mac OSx

ArchitectureLocalInside a Codespace
Intel🙅
Apple🏃🙅

Linux

DistroLocalInside Codespace
Ubuntu
Debian
Fedora??
Red Hat??
Mint??
OpenSUSE??
Centos??
Kali??
Raspberry Pi OS??
Alpine (bullseye)?

Windows

VersionLocalInside a Codespace
Windows 10🏃🙅
Windows 11🏃🙅

Legend: ✅ - currently supported 🏃 - in progress 🙅 - not applicable? - 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

Contributing

Security policy

Stars

Watchers

Forks

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp