

rtty:在任何地方通过 Web 访问您的终端
source link: https://github.com/zhaojh329/rtty/blob/master/README_ZH.md?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

rtty
它由客户端和 服务端 组成。客户端采用纯C实现。 服务端 采用GO语言实现,前端界面采用 iview 和 vue 实现。
你可以在任何地方通过Web访问你的终端。通过设备ID(如果不设置则使用设备的MAC地址)来区分你的不同的终端。
rtty非常适合远程维护你的或者你公司的部署在全球各地的成千上万的Linux设备。
特性
- 部署简单,使用方便
- 根据设备ID访问不同的设备
- 提供dashboard,直观的展示在线设备
- 基于 Xterm.js 的全功能终端
- 支持使用 lrzsz 传输文件
- 支持SSL: openssl, mbedtls, CyaSSl(wolfssl)
- 支持远程执行命令
- 客户端非常小,适合嵌入式Linux: rtty(20.1K) + libev(48.5K) + libuwsc(24.4K) + libwolfssl(595.9K) = 688.9K
客户端依赖
- libev - 高性能的事件循环库
- libuwsc - 一个轻量的针对嵌入式Linux的基于libev的WebSocket客户端C库。
- mbedtls(polarssl) 、 CyaSSl(wolfssl) 或者 openssl - 如果你需要支持SSL
部署服务端
如何安装和运行rtty客户端
针对Linux发行版:Ubuntu, Debian, ArchLinux, Centos
安装
wget -qO- https://raw.githubusercontent.com/zhaojh329/rtty/master/tools/install.sh | sudo bash
查看命令行选项
Usage: rtty [option] -i ifname # Network interface name - Using the MAC address of the interface as the device ID -I id # Set an ID for the device(Maximum 63 bytes, valid character:letters and numbers and underlines and short lines) - If set, it will cover the MAC address(if you have specify the ifname) -h host # Server host -p port # Server port -a # Auto reconnect to the server -v # verbose -d # Adding a description to the device(Maximum 126 bytes) -s # SSL on -k keepalive # keep alive in seconds for this client. Defaults to 5 -V # Show version -D # Run in the background
运行RTTY(将下面的参数替换为你自己的参数)
sudo rtty -I 'My-device-ID' -h 'your-server' -p 5912 -a -v -s -d 'My Device Description'
嵌入式Linux平台
你需要自行交叉编译
如何在OpenWRT中使用
如何使用
使用你的Web浏览器访问你的服务器: https://your-server-host:5912
,然后点击连接按钮。
你可以非常方便的将RTTY嵌入到你现有的平台: https://your-server-host:5912/#/?id=your-id
自动登录: https://your-server:5912/#/?id=device-id&username=device-username&password=device-password
远程执行命令
Shell
curl -k https://your-server:5912/cmd -d '{"devid":"test","username":"test","password":"123456","cmd":"ls","params":["/"],"env":{}}' {"Err":0,"msg":"","code":0,"stdout":"bin\ndev\netc\nlib\nmnt\noverlay\nproc\nrom\nroot\nsbin\nsys\ntmp\nusr\nvar\nwww\n","stderr":""}
Jquery
var data = {devid: 'test', username: 'test', password: '123456', cmd: 'ls', params: ['/'], env: {}}; $.post('https://your-server:5912/cmd', JSON.stringify(data), function(r) {console.log(r)});
Axios
var data = {devid: 'test', username: 'test', password: '123456', cmd: 'ls', params: ['/'], env: {}}; axios.post('https://your-server:5912/cmd', JSON.stringify(data)).then(function (response) { console.log(response.data); }).catch(function (error) { console.log(error); });
捐赠
贡献代码
如果你想帮助 rtty 变得更好,请参考 CONTRIBUTING_ZH.md 。
技术交流
QQ群:153530783
如果该项目对您有帮助,请随手star,谢谢!
Recommend
-
48
在任何地方看到小孩的我
-
42
截至12月23日,全国ETC客户累计达到1.97亿,比去年同期净增了1.2亿,增长了157%。在ETC发行过程中,部分地区发生了一些不规范行为,如有的提前占用车牌信息、有的不安装ETC就无法通行高速公路等。对于这些不规范行为,交通运输部高度
-
11
绕过 Java 编译器检查,在任何地方抛出受检异常 发表于 2017-12-16 | 标签 Java | 作者 刘文俊这次我要写的内容也是一个黑科技,就是在实际工作中没卵用的那种。秉着实用主义至上...
-
12
作者:hrishikesh1990整理者:前端小智来源:dev点赞再看,微信搜索【大迁世界】关注这个没有大厂背景,但有着一股向上积极心态人。本文 GitHub
-
19
1 不一样的世界 在常规的Spring Web项目中,我们要获取Request对象是非常方便的,不少库都提供了静态方法来获取。获取代码如下: ServletRequestAttributes requestAttributes = (ServletRequestAttributes)...
-
12
终端环境使用w3m访问视频站点的正确方式 - 暗无天日File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/config/TeX-AMS-MML_HTMLorMML.js 终端环境使用w3m访问视频站点的正确方式 w3m是一款不错的...
-
12
全息盒将你“瞬移”到任何地方
-
12
TP mini小白路由内置文件共享的应用,可以与局域网终端共享存储卡(内置和外置
-
6
TP mini小白路由内置文件共享的应用,可以与局域网终端共享存储卡(内置和外置SD卡)中的内容。与小白路由连接到同一局域网的Windows电脑、移动终端均可以使用相应的共享访问方...
-
10
防火墙内网服务器和终端外网访问原理概述:防火墙(英语:Firewall)技术是通过有机结合各类用于安全管理与筛选的软件和硬件设备,帮助计算机网络于其内、外网之间构建一道相对隔绝的保护屏障,以保护用户资料与信息安全性的一...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK