1 Star 0 Fork 275

caiyongting / rtty

forked from 赵建辉 / rtty 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

rtty - 在任何地方通过Web访问您的设备的终端

license PRs Welcome Issue Welcome Release Version Build Status visitors Support rtty Chinese Chat

它由客户端和服务端组成。客户端采用纯C实现。服务端采用GO语言实现,前端界面采用vue实现。

您可以在任何地方通过Web访问您的设备的终端。通过设备ID来区分您的不同的设备。

rtty非常适合远程维护您的或者您的公司的部署在全球各地的成千上万的Linux设备。

特性

  • 客户端 C 语言实现,非常小,适合嵌入式 Linux
    • 不支持 SSL: rtty(32K) + libev(56K)
    • 支持 SSL: + libmbedtls(88K) + libmbedcrypto(241K) + libmbedx509(48k)
  • 远程批量执行命令
  • 支持SSL: openssl, mbedtls, CyaSSl(wolfssl)
  • SSL 双向认证(mTLS)
  • 非常方便的上传和下载文件
  • 根据设备ID访问不同的设备
  • 支持 HTTP 代理 - 访问您的设备的 Web
  • 基于Xterm.js的全功能终端
  • 部署简单,使用方便

客户端依赖

部署服务端

如何安装rtty

针对Linux发行版

安装依赖

sudo apt install -y libev-dev libssl-dev      # Ubuntu, Debian
sudo pacman -S --noconfirm libev openssl      # ArchLinux
sudo yum install -y libev-devel openssl-devel # Centos

克隆rtty代码

git clone --recursive https://github.com/zhaojh329/rtty.git

编译

cd rtty && mkdir build && cd build
cmake .. && make install

如何在Buildroot中使用

在menuconfig中选中rtty然后编译

Target packages  --->
    Shell and utilities  --->
        [*] rtty

如何在OpenWRT中使用

其它嵌入式Linux平台

命令行选项

Usage: rtty [option]
    -I, --id=string          Set an ID for the device(Maximum 63 bytes, valid
                             character:letter, number, underline and short line)
    -h, --host=string        Server's host or ipaddr(Default is localhost)
    -p, --port=number        Server port(Default is 5912)
    -d, --description=string Add a description to the device(Maximum 126 bytes)
    -a                       Auto reconnect to the server
    -s                       SSL on
    -C, --cacert             CA certificate to verify peer against
    -x, --insecure           Allow insecure server connections when using SSL
    -c, --cert               Certificate file to use"
    -k, --key                Private key file to use"
    -D                       Run in the background
    -t, --token=string       Authorization token
    -f username              Skip a second login authentication. See man login(1) about the details
    -R                       Receive file
    -S file                  Send file
    -v, --verbose            verbose
    -V, --version            Show version
    --help                   Show usage

运行rtty

将下面的参数替换为您自己的参数

sudo rtty -I 'My-device-ID' -h 'your-server' -p 5912 -a -v -d 'My Device Description'

如果您的 rttys 配置了一个 token,请加上如下参数(将下面的 token 替换为您自己生成的)

-t 34762d07637276694b938d23f10d7164

如何使用

使用您的 Web 浏览器访问您的服务器: http://your-server-host:5913,然后点击连接按钮。

直接连接设备,无需 Web 登录(需要在服务端配置设备白名单)

http://your-server-host:5913/connect/devid1

http://your-server-host:5913/connect/devid2

传输文件

从本地传输文件到远程设备

rtty -R

从远程设备传输文件到本地

rtty -S test.txt

远程执行命令

贡献代码

如果您想帮助 rtty 变得更好,请参考 CONTRIBUTING_ZH.md

强烈推荐佐大的 OpenWrt 培训班

想学习 OpenWrt 开发,但是摸不着门道?自学没毅力?基础太差?怕太难学不会?快来参加<跟着佐大学 OpenWrt 开发入门培训班> 佐大助你能学有所成,培训班报名地址:http://forgotfun.org/2018/04/openwrt-training-2018.html

捐贈

如果你觉得此项目对你有帮助,可以捐助开发者,以鼓励项目能持续发展,更加完善

支付宝

微信

MIT License Copyright (c) 2019 Jianhui Zhao <zhaojh329@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

在任何地方通过web访问您的设备的终端 展开 收起
C
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/caiyongting123/rtty.git
git@gitee.com:caiyongting123/rtty.git
caiyongting123
rtty
rtty
master

搜索帮助

14c37bed 8189591 565d56ea 8189591