MIT License

项目介绍

beordle/termtunnel 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 MIT License 许可证,目前获得 373 个 Star、38 次 Fork。

仓库全名
beordle/termtunnel
开源许可证
MIT License
Star 数
373
Fork 数
38
未关闭 Issue
3

README 摘要

Termtunnel 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. Quickstart You must ensure that the termtunnel binary exists on both the local and remote first. Please use termtunnel to open any locally terminal application such as ssh, bash, etc. After running, the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

termtunnel 用什么语言开发?

主要使用 C 编写,采用 MIT License 许可证,目前有 373 个 Star。

termtunnel 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 termtunnel 的源码?

可以直接克隆仓库:git clone https://github.com/beordle/termtunnel.git,默认分支为 master;安装与运行步骤见仓库 README。

termtunnel 最近还在维护吗?

仓库最近一次更新为 4月14日,当前有 3 个未关闭 Issue;Star 数为 373,可作为社区活跃度的参考。

关于

Cross-platform terminal tunnel tool

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
452
价值分
235
活跃状态
活跃

语言占比

C
CMake

Release

贡献者

README

Termtunnel Termtunnel

Termtunnel 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.

Quickstart

You must ensure that the termtunnel binary exists on both the local and remote first.

Please use termtunnel to open any locally terminal application such as ssh, bash, etc.

sh-3.2$ >> termtunnel ssh [email protected]

After running, the terminal output is the same as without the termtunnel prefix, and you can keep your normal usage habits.

sh-3.2$ >> termtunnel ssh [email protected]
root@host:~# echo loulou
loulou
root@host:~# uname -a
Linux 5.10.0-11-amd64 #1 SMP Debian 5.10.92-2 (2022-02-28) x86_64 GNU/Linux

When a tunnel needs to be established, just run command termtunnel -a on that remote host.

For example, you can execute termtunnel ssh [email protected] locally, then start /tmp/termtunnel -a on the ssh host to enter the termtunnel shell

In the termtunnel shell, you are allowed to download and upload files or create socks5 proxy.

So how to use the console? See Use case please.

And, If you want to speed up the process, you can use ONESHOT mode to started immediately without entering a session.

sh-3.2$ >> termtunnel ssh [email protected]
root@host:~# /tmp/termsocks -a
termtunnel>> help

Install

  • MacOS

    • brew install beordle/tap/termtunnel
  • Linux

  • Windows

    • Provide prebuilt binaries to run. Download
  • Android or iOS

    • use Termux on Android, iSH on iOS to run Linux binary.

Use case

This documentation may be out of date, please refer to the output of the help command if necessary.

Download a file to local

type download path/to/file and Enter, choose a folder to save.

Upload a file to remote

type upload and Enter, choose a file to upload.

Share local internet with remote

type remote_listen 127.0.0.1 8000 127.0.0.1 0 and enter

now, the port 8000 is a socks5/http mixed proxy server. well, open new a window to use it.

eg. You can use it by curl: curl --socks5 127.0.0.1:8000 https://google.com and curl -x 127.0.0.1:8000 https://google.com or, let yum use it.

Share Intranet host 10.11.123.123’s VNC port 5100 with local

type local_listen 127.0.0.1 3333 10.11.123.123 5100 and enter

now, the port 3333 on your local compute is 10.11.123.123’s VNC port.

use a local GUI VNC client to connect it!

ONESHOT mode

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.

Build from Source

Linux/MacOS
cmake .
make
Windows

Please use MSYS2 to compile under windows.

pacman -Syu libuv libuv-devel cmake make 
pacman -Syu openssh  # optional
cmake .
make

FAQ

  1. Can I make the whole process unattended? To reduce user intervention, you can try to use UNIX expect tool.
  2. 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

License

This application is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE file for details.

评论

暂无评论