rtty:在任何地方通过 Web 访问您的终端

栏目: 编程工具 · 发布时间: 7年前

内容简介:它由客户端和你可以在任何地方通过Web访问你的终端。通过设备ID(如果不设置则使用设备的MAC地址)来区分你的不同的终端。

rtty

rtty:在任何地方通过 Web 访问您的终端 rtty:在任何地方通过 Web 访问您的终端

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

你可以在任何地方通过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

客户端依赖

部署服务端

如何安装和运行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,谢谢!


以上所述就是小编给大家介绍的《rtty:在任何地方通过 Web 访问您的终端》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

PHP for the World Wide Web, Second Edition (Visual QuickStart Gu

PHP for the World Wide Web, Second Edition (Visual QuickStart Gu

Larry Ullman / Peachpit Press / 2004-02-02 / USD 29.99

So you know HTML, even JavaScript, but the idea of learning an actual programming language like PHP terrifies you? Well, stop quaking and get going with this easy task-based guide! Aimed at beginning ......一起来看看 《PHP for the World Wide Web, Second Edition (Visual QuickStart Gu》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

SHA 加密
SHA 加密

SHA 加密工具