https://github.com/noisysockets/nsh Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} noisysockets / nsh Public * Notifications * Fork 1 * Star 137 * The Noisy Sockets CLI 137 stars 1 fork Branches Tags Activity Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights noisysockets/nsh This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 12 Commits .github/workflows .github/workflows cmd cmd docs docs internal internal web web .earthlyignore .earthlyignore .gitignore .gitignore Earthfile Earthfile LICENSE-AGPL-3.0.txt LICENSE-AGPL-3.0.txt LICENSE-NSSL-1.0.txt LICENSE-NSSL-1.0.txt README.md README.md go.mod go.mod go.sum go.sum main.go main.go View all files Repository files navigation * README nsh The Noisy Sockets CLI. The Noisy Sockets CLI can be used to configure and manage userspace WireGuard connections. Over time it will grow to include a collection of WireGuard powered apps. The first of these apps is the Noisy Sockets Shell which is a secure, remote shell that uses WireGuard for authentication and encryption. The shell is accessible via a terminal or a web browser. Screenshot Terminal Screenshot Showing a terminal session using the in-browser client. Getting Started Initialize Configuration The config init command will generate a new private key and populate the configuration file with the provided options. nsh config init -c server.yaml -n server --listen-port=51820 --ip=172.21.248.1 nsh config init -c client.yaml -n client --listen-port=51821 --ip=172.21.248.2 Add Peers The server and client will need to be aware of each other in order to establish a connection. The peer add command will add a peer to the configuration file. Note: The client will need to know the servers endpoint in order to establish a connection. nsh peer add -c server.yaml \ --name=client \ --public-key=$(nsh config show -c client.yaml 'public(.privateKey)') \ --ip=$(nsh config show -c client.yaml '.ips[0]') nsh peer add -c client.yaml \ --name=server \ --public-key=$(nsh config show -c server.yaml 'public(.privateKey)') \ --endpoint=$(nsh config show -c server.yaml '"localhost:" + (.listenPort|tostring)') \ --ip=$(nsh config show -c server.yaml '.ips[0]') Start Server In another tab, start the server. nsh shell serve -c server.yaml Connect to Server Using CLI You can connect to the shell server by its hostname, or the IP address. In the following example, we will connect to the server using the hostname. nsh shell connect -c client.yaml server Using Browser When using the wg kernel module, you will need t connect to the shell server using the IP address (as we haven't yet implemented an integrated DNS resolver). sudo nsh config export -c client.yaml -o /etc/wireguard/nsh0.conf sudo wg-quick up nsh0 xdg-open http://172.21.248.1 License The Noisy Sockets CLI is dual licensed under the Noisy Sockets Source License 1.0 (NSSL-1.0) and the Affero General Public License v3 (AGPL-3.0). The NSSL-1.0 is a source-available license derived from the FSL-1.1 with the following changes: * Code will become FOSS after 4 years rather than 2 years. * The future license is MPL-2.0 (a weak copyleft) rather than Apache-2.0. You are welcome to use the Noisy Sockets CLI under the terms of either license. Credits Noisy Sockets is based on code originally from the wireguard-go project by Jason A. Donenfeld. WireGuard is a registered trademark of Jason A. Donenfeld. About The Noisy Sockets CLI Resources Readme Activity Custom properties Stars 137 stars Watchers 0 watching Forks 1 fork Report repository Releases 2 v0.2.0 Latest May 11, 2024 + 1 release Packages 0 No packages published Languages * Go 77.0% * TypeScript 14.7% * Earthly 4.2% * CSS 2.7% * Other 1.4% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.