偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

rtty:反向代理WebTTY ,Linux遠(yuǎn)程維護(hù)調(diào)試工具

系統(tǒng) Linux
rtty 是一個(gè)反向代理 WebTTY。它由客戶端和服務(wù)端組成。服務(wù)端采用 Go 語言實(shí)現(xiàn), 以及使用了 vue + iview。你可以基于你設(shè)置的設(shè)備 ID(不設(shè)置則為設(shè)備的 MAC 地址)通過 Web 瀏覽器訪問你的任意一臺(tái)終端。

[[223706]]

rtty 是一個(gè)反向代理 WebTTY。它由客戶端和服務(wù)端組成。服務(wù)端采用 Go 語言實(shí)現(xiàn), 以及使用了 vue + iview。你可以基于你設(shè)置的設(shè)備 ID(不設(shè)置則為設(shè)備的 MAC 地址)通過 Web 瀏覽器訪問你的任意一臺(tái)終端。

rtty 非常適合遠(yuǎn)程維護(hù)你的或者你公司的部署在全球各地的成千上萬的 Linux 設(shè)備。

 

特性

  • 部署簡(jiǎn)單,使用方便
  • 反向代理
  • 根據(jù)你設(shè)置的 ID 連接你的設(shè)備
  • 基于 Xterm.js 的全功能終端
  • 支持 SSL: openssl、mbedtls、 CyaSSl(wolfssl)
  • 支持上傳文件到設(shè)備
  • 支持從設(shè)備下載文件
  • 支持遠(yuǎn)程執(zhí)行命令
  • 跨平臺(tái): macOS、Linux、FreeBSD/OpenBSD、OpenWrt/LEDE

 

客戶端依賴

  • libubox - 用于 OpenWrt 的 C 工具函數(shù)庫,但也可以用于其他 Linux 系統(tǒng)中。(參考
  • libuwsc - 一個(gè)輕量的針對(duì)嵌入式 Linux 的基于 libubox 的 WebSocket 客戶端 C 庫。
  • ustream-ssl - 如果你需要支持 SSL
    • mbedtls - 如果你選擇 mbedtls 作為你的 SSL 后端
    • CyaSSl(wolfssl) - 如果你選擇 wolfssl 作為你的 SSL 后端
    • openssl - 如果你選擇 openssl 作為你的 SSL 后端

 

部署服務(wù)端

 

安裝

  1. curl https://raw.githubusercontent.com/zhaojh329/rttys/master/install.sh | sudo sh

 

手動(dòng)運(yùn)行

  1. rttys -cert /etc/rttys/rttys.crt -key /etc/rttys/rttys.key

 

后臺(tái)運(yùn)行

  1. sudo /etc/init.d/rttys start

 

如何編譯和安裝 rtty 客戶端

 

針對(duì) Linux 發(fā)行版,例如 Ubuntu 和 CentOS

安裝編譯工具:

  1. sudo apt install gcc cmake git # For Ubuntu
  2.  
  3. yum install gcc cmake git # For Centos

編譯和安裝依賴軟件包:

  1. sudo apt install libjson-c-dev # For Ubuntu
  2.  
  3. sudo apt install json-c-devel # For Centos
  4.  
  5. git clone https://git.openwrt.org/project/libubox.git
  6. cd libubox && cmake -DBUILD_LUA=OFF . && sudo make install
  7.  
  8. git clone https://github.com/zhaojh329/libuwsc.git
  9. cd libuwsc && cmake -DUWSC_SSL_SUPPORT=OFF . && sudo make install

編譯和安裝 rtty:

  1. git clone https://github.com/zhaojh329/rtty.git
  2. cd rtty && cmake . && sudo make install

運(yùn)行 rtty ,將下面的參數(shù)替換為你自己的參數(shù):

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

查詢?cè)诰€設(shè)備列表:

  1. curl -k https://your-server:5912/devs
  2. [{"id":"My-device-ID","description":"My device"}]

 

嵌入式Linux平臺(tái)

你需要自行交叉編譯。

 

如何在 OpenWRT 中使用

安裝:

  1. opkg update
  2. opkg list | grep rtty
  3. opkg install rtty-nossl

如果安裝失敗,你可以自己編譯。

配置服務(wù)器參數(shù):

  1. uci add rtty rtty # If it's the first configuration
  2. uci set rtty.@rtty[0].host='your server host'
  3. uci set rtty.@rtty[0].port='your server port'

你可以給你的設(shè)備自定義一個(gè) ID。如果未指定,rtty 將使用指定的網(wǎng)絡(luò)接口的 MAC 地址作為其 ID, 以 MAC 地址作為 ID 的格式為:1A2A3A4A5A6A。

  1. uci set rtty.@rtty[0].id='your-device-id'

使用 SSL:

  1. uci set rtty.@rtty[0].ssl='1'

保存配置并應(yīng)用:

  1. uci commit
  2. /etc/init.d/rtty restart

 

如何使用

使用你的 Web 瀏覽器訪問你的服務(wù)器: https://your-server-host:5912,然后點(diǎn)擊連接按鈕。

你可以非常方便的將 rtty 嵌入到你現(xiàn)有的平臺(tái): https://your-server-host:5912?id=your-id。

自動(dòng)登錄: https://your-server:5912/?id=device-id&username=device-username&password=device-password。

 

上傳文件和下載文件

使用快捷鍵打開菜單: Ctrl+Shift+f。

 

 

遠(yuǎn)程執(zhí)行命令

  1. curl -k https://your-server:5912/cmd -d '{"devid":"test","username":"test","password":"123456","cmd":"ls","params":["/"],"env":[]}'
  2.  
  3. {"Err":0,"msg":"","code":0,"stdout":"bin\ndev\netc\nlib\nmnt\noverlay\nproc\nrom\nroot\nsbin\nsys\ntmp\nusr\nvar\nwww\n","stderr":""}

 

貢獻(xiàn)代碼

如果你想幫助 rtty 變得更好,請(qǐng)參考 CONTRIBUTING_ZH.md。 

責(zé)任編輯:龐桂玉 來源: Linux中國
相關(guān)推薦

2020-05-21 15:53:59

遠(yuǎn)程調(diào)試工具

2023-11-10 09:20:28

Java工具

2024-02-23 10:00:27

Linux工具

2010-06-02 15:21:29

Linux 網(wǎng)絡(luò)性能

2010-06-02 15:45:45

Linux 網(wǎng)絡(luò)性能

2010-06-02 15:37:38

Linux 網(wǎng)絡(luò)性能

2023-10-25 09:26:23

Linux工具

2022-08-28 10:36:53

調(diào)試工具通用

2011-08-15 17:38:48

iPhone開發(fā)調(diào)試工具

2024-01-24 13:22:40

Python調(diào)試工具技巧

2023-03-29 08:18:16

Go調(diào)試工具

2024-07-09 08:31:26

2023-09-08 00:07:41

2022-07-01 07:33:24

nginx反向代理測(cè)試

2018-03-13 11:38:14

2016-12-02 20:23:51

AndroidADB

2025-03-31 03:25:00

2012-02-24 09:25:20

JavaScript

2023-12-05 09:14:54

2022-08-21 14:05:54

調(diào)試工具CDP
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)