{"id":13721615,"url":"https://github.com/function61/holepunch-client","last_synced_at":"2025-05-07T14:30:37.139Z","repository":{"id":144205414,"uuid":"147666221","full_name":"function61/holepunch-client","owner":"function61","description":"Totally self-contained SSH reverse tunnel written in Go","archived":false,"fork":false,"pushed_at":"2021-03-12T08:00:19.000Z","size":110,"stargazers_count":79,"open_issues_count":3,"forks_count":20,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-02-15T07:36:44.881Z","etag":null,"topics":["reverse-tunnel","ssh","ssh-tunnel"],"latest_commit_sha":null,"homepage":"https://function61.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/function61.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-09-06T11:53:46.000Z","updated_at":"2024-01-19T10:25:42.000Z","dependencies_parsed_at":"2023-06-19T12:37:53.386Z","dependency_job_id":null,"html_url":"https://github.com/function61/holepunch-client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fholepunch-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fholepunch-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fholepunch-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fholepunch-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/function61","download_url":"https://codeload.github.com/function61/holepunch-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895472,"owners_count":21821167,"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":["reverse-tunnel","ssh","ssh-tunnel"],"created_at":"2024-08-03T01:01:19.327Z","updated_at":"2025-05-07T14:30:36.789Z","avatar_url":"https://github.com/function61.png","language":"Go","funding_links":[],"categories":["\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具","Command and Control"],"sub_categories":["\u003ca id=\"9d6789f22a280f5bb6491d1353b02384\"\u003e\u003c/a\u003e隧道\u0026\u0026穿透"],"readme":"![Build status](https://github.com/function61/holepunch-client/workflows/Build/badge.svg)\r\n[![Download](https://img.shields.io/github/downloads/function61/holepunch-client/total.svg?style=for-the-badge)](https://github.com/function61/holepunch-client/releases)\r\n\r\nWhat?\r\n-----\r\n\r\nUPDATE: You might be best served by mesh VPN like Tailscale (or WireGuard), they can even expose subnets.\r\n\r\n\r\nThis is a standalone binary for creating a semi-persistent (client tries its best to\r\ndetect errors, use keepalives and do reconnects) SSH reverse tunnel.\r\n\r\nYou can use the native OpenSSH server as a server, or\r\n[function61/holepunch-server](https://github.com/function61/holepunch-server) which brings\r\nsome fancier optional features like purely-over-HTTP operation.\r\n\r\nFailed connections are automatically retried and includes a helper to add this service to system startup (Systemd).\r\n\r\n\r\nUsage\r\n-----\r\n\r\nDownload a suitable binary (we support Linux/AMD64, Linux/ARM and Windows/AMD64) for you\r\nfrom the download link.\r\n\r\nFirst, generate a keypair for you:\r\n\r\n```console\r\n$ ssh-keygen -t ecdsa -b 521 -C \"my awesome private key\" -f id_ecdsa\r\n```\r\n\r\nCopy content of `id_ecdsa.pub` to your SSH server's `authorized_keys` file.\r\n\r\nWrite `holepunch.json` (see [holepunch.example.json](holepunch.example.json)).\r\nYou can use this with a vanilla SSH server, but if you're using\r\n[function61/holepunch-server](https://github.com/function61/holepunch-server), you can also\r\nconnect via WebSocket if you use format like `ws://example.com/_ssh` as server address\r\n(or `wss://` for https).\r\n\r\nIf you use holepunch-server, the default username is `hp`, but it can be overridden\r\n(see the server documentation).\r\n\r\nRun client:\r\n\r\n```console\r\n$ ./holepunch connect\r\n```\r\n\r\nTo exit, type `Ctrl + c` for graceful stop.\r\n\r\nTo make holepunch automatically start on system startup (and restart on crashes):\r\n\r\n```console\r\n$ ./holepunch write-systemd-file\r\nWrote unit file to /etc/systemd/system/holepunch.service\r\nRun to enable on boot \u0026 to start now:\r\n        $ systemctl enable holepunch\r\n        $ systemctl start holepunch\r\n        $ systemctl status holepunch\r\n```\r\n\r\n\r\nHow to build \u0026 develop\r\n----------------------\r\n\r\n[How to build \u0026 develop](https://github.com/function61/turbobob/blob/master/docs/external-how-to-build-and-dev.md)\r\n(with Turbo Bob, our build tool). It's easy and simple!\r\n\r\nIf you prefer to not install Turbo Bob, standard Go build commands work\r\n([instructions here](https://github.com/function61/holepunch-client/issues/10#issuecomment-634530149)).\r\n\r\n\r\nCredits\r\n-------\r\n\r\nHugely inspired by [codref's gist](https://gist.github.com/codref/473351a24a3ef90162cf10857fac0ff3)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunction61%2Fholepunch-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunction61%2Fholepunch-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunction61%2Fholepunch-client/lists"}