{"id":13613297,"url":"https://github.com/beordle/termtunnel","last_synced_at":"2025-04-13T15:33:01.106Z","repository":{"id":40260565,"uuid":"479730166","full_name":"beordle/termtunnel","owner":"beordle","description":"Cross-platform terminal tunnel tool","archived":false,"fork":false,"pushed_at":"2024-05-21T13:49:59.000Z","size":3165,"stargazers_count":357,"open_issues_count":3,"forks_count":36,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-07T21:41:57.424Z","etag":null,"topics":["bastion-tools","bypass","jump-server","lrzsz","proxy","ssh","terminal","tunnel"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beordle.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-09T13:11:14.000Z","updated_at":"2024-11-05T10:50:38.000Z","dependencies_parsed_at":"2024-01-17T00:18:21.550Z","dependency_job_id":"6d851bc6-02ce-44e9-9623-cb111cd39bab","html_url":"https://github.com/beordle/termtunnel","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beordle%2Ftermtunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beordle%2Ftermtunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beordle%2Ftermtunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beordle%2Ftermtunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beordle","download_url":"https://codeload.github.com/beordle/termtunnel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248736098,"owners_count":21153533,"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":["bastion-tools","bypass","jump-server","lrzsz","proxy","ssh","terminal","tunnel"],"created_at":"2024-08-01T20:00:43.613Z","updated_at":"2025-04-13T15:33:00.242Z","avatar_url":"https://github.com/beordle.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Termtunnel [![Termtunnel](https://github.com/beordle/termtunnel/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/beordle/termtunnel/actions/workflows/build.yml)\nTermtunnel is a tool that allows you to create a tunnel via multiple hops or fight against intranet isolation in a very simple way. As lrzsz can, termtunnel supports not only file transfer but also network proxy.\n\n## Quickstart\n\n**You must ensure that the termtunnel binary exists on both the local and remote first.**\n\nPlease use termtunnel to open any locally terminal application such as ssh, bash, etc.\n\n```bash\nsh-3.2$ \u003e\u003e termtunnel ssh root@19.95.02.23\n```\n\nAfter running, the terminal output is the same as without the `termtunnel` prefix, and you can keep your normal usage habits.\n```bash\nsh-3.2$ \u003e\u003e termtunnel ssh root@19.95.02.23\nroot@host:~# echo loulou\nloulou\nroot@host:~# uname -a\nLinux 5.10.0-11-amd64 #1 SMP Debian 5.10.92-2 (2022-02-28) x86_64 GNU/Linux\n```\n\nWhen a tunnel needs to be established, just run command `termtunnel -a` on that remote host.\n\nFor example, you can execute `termtunnel ssh root@19.95.02.23` locally, then start `/tmp/termtunnel -a` on the ssh host to enter the termtunnel shell\n\nIn the termtunnel shell, you are allowed to download and upload files or create socks5 proxy.\n\n**So how to use the console?**  *See [Use case](#use-case) please.*\n\n**And, If you want to speed up the process, you can use [ONESHOT mode](#oneshot-mode) to started immediately without entering a session.**\n\n```bash\nsh-3.2$ \u003e\u003e termtunnel ssh root@19.95.02.23\nroot@host:~# /tmp/termsocks -a\ntermtunnel\u003e\u003e help\n```\n\n## Install\n\n* MacOS\n   * `brew install beordle/tap/termtunnel`\n\n* Linux\n  * Provide prebuilt static binaries to run. See [lastest releases](https://github.com/beordle/termtunnel/releases/latest)\n\n* Windows\n  * Provide prebuilt binaries to run. [Download](https://github.com/beordle/termtunnel/releases/download/windows/termtunnel.zip) \n\n* Android or iOS\n  * use Termux on Android, iSH on iOS to run Linux binary.\n\n## Use case\n\u003e This documentation may be out of date, please refer to the output of the **help** command  if necessary.\n\n#### Download a file to local\n\u003e type `download path/to/file` and Enter, choose a folder to save.\n\n#### Upload a file to remote\n\u003e type `upload` and Enter, choose a file to upload. \n\n####  Share local internet with remote\n\u003e type `remote_listen 127.0.0.1 8000 127.0.0.1 0` and enter\n\n\u003e now, the port 8000 is a socks5/http mixed proxy server. well, open new a window to use it.\n \n\u003e eg. You can use it by curl: `curl --socks5 127.0.0.1:8000 https://google.com`\n\u003e and `curl -x 127.0.0.1:8000 https://google.com`\n\u003e or, [let yum use it.](https://unix.stackexchange.com/questions/43654/how-to-use-socks-proxy-with-yum)\n\n#### Share Intranet host 10.11.123.123's VNC port 5100 with local\n\u003e type `local_listen 127.0.0.1 3333 10.11.123.123 5100` and enter\n\n\u003e now, the port 3333 on your local compute is 10.11.123.123's VNC port.\n\n\u003e use a local GUI VNC client to connect it!\n#### ONESHOT mode\n\u003e you can directly run `termtunnel -- local_listen 127.0.0.1 80 127.0.0.1 0`, `termtunnel -- rz` or `termtunnel -- sz path\\to\\file`. in terminal, the corresponding action will be started immediately without entering a session.\n \n\n\n\n## Build from Source\n\n#### Linux/MacOS\n```bash\ncmake .\nmake\n```\n\n#### Windows\n\u003e Please use MSYS2 to compile under windows.\n```\npacman -Syu libuv libuv-devel cmake make \npacman -Syu openssh  # optional\ncmake .\nmake\n ```\n \n## FAQ\n\n1. **Can I make the whole process unattended？** To reduce user intervention, you can try to use UNIX expect tool.\n2. **How to use it with tmux？** Out of the box. Designed with tmux in mind. But because of the implementation of tmux, the speed is very limited. If you want to improve the speed, you need to modify the source code and recompile tmux\n\n## License\nThis application is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeordle%2Ftermtunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeordle%2Ftermtunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeordle%2Ftermtunnel/lists"}