From c24912cf01e8dccec804c6b96e2a5e46440dc20f Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 12 Jan 2018 11:01:55 +0800 Subject: [PATCH] Renamed project: xttyd -> rtty Signed-off-by: Jianhui Zhao --- CMakeLists.txt | 2 +- CONTRIBUTING.md | 6 ++-- CONTRIBUTING_ZH.md | 6 ++-- README.md | 39 +++++++++++++------------ README_ZH.md | 41 ++++++++++++++------------- xttyd.png => rtty.png | Bin server/install.sh | 14 ++++----- server/{xttyd.init => rtty.init} | 10 +++---- server/{xttyd.py => rtty.py} | 0 server/www/{xttyd.html => rtty.html} | 6 ++-- src/CMakeLists.txt | 6 ++-- 11 files changed, 66 insertions(+), 64 deletions(-) rename xttyd.png => rtty.png (100%) rename server/{xttyd.init => rtty.init} (70%) rename server/{xttyd.py => rtty.py} (100%) rename server/www/{xttyd.html => rtty.html} (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39d5eaf..aa15339 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8) -project(xttyd C) +project(rtty C) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/") diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c017ef..ad87e88 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ Contributing ================================================================================ -If you want to contribute to [xttyd](https://github.com/zhaojh329/xttyd), please follow these simple rules: +If you want to contribute to [rtty](https://github.com/zhaojh329/rtty), please follow these simple rules: 1. Press the fork button: @@ -10,13 +10,13 @@ If you want to contribute to [xttyd](https://github.com/zhaojh329/xttyd), please 2. Clone the repository from your account with: ``` - git clone https://github.com/your_github_username/xttyd.git + git clone https://github.com/your_github_username/rtty.git ``` 3. Create a new branch with: ``` - git checkout -b "xttyd-1-fix" + git checkout -b "rtty-1-fix" ``` You can name it however you want. diff --git a/CONTRIBUTING_ZH.md b/CONTRIBUTING_ZH.md index 8a1d023..7efc816 100755 --- a/CONTRIBUTING_ZH.md +++ b/CONTRIBUTING_ZH.md @@ -1,7 +1,7 @@ 贡献代码 ================================================================================ -如果你想为[xttyd](https://github.com/zhaojh329/xttyd)贡献代码, 请按照如下步骤: +如果你想为[rtty](https://github.com/zhaojh329/rtty)贡献代码, 请按照如下步骤: 1. 点击fork按钮: @@ -10,13 +10,13 @@ 2. 从你的github账户克隆仓库代码: ``` - git clone https://github.com/你的github账户/xttyd.git + git clone https://github.com/你的github账户/rtty.git ``` 3. 创建一个新的分支: ``` - git checkout -b "xttyd-1-fix" + git checkout -b "rtty-1-fix" ``` 你可以使用一个你想要的分支名称。 diff --git a/README.md b/README.md index f70632e..2adefc0 100755 --- a/README.md +++ b/README.md @@ -1,17 +1,16 @@ -# xTTYD([中文](https://github.com/zhaojh329/xttyd/blob/master/README_ZH.md)) +# rtty([中文](https://github.com/zhaojh329/rtty/blob/master/README_ZH.md)) ![](https://img.shields.io/badge/license-GPLV3-brightgreen.svg?style=plastic "License") -[ttyd]: https://github.com/tsl0922/ttyd [libubox]: https://git.openwrt.org/?p=project/libubox.git [libuwsc]: https://github.com/zhaojh329/libuwsc -Share your terminal over the web. Unlike [ttyd], xTTYD consists of two parts of the client and the server. -xTTYD can share the shell of your device based on the MAC address you specify. +Access your terminal over the web browser. The 'r' in the name refers to the 'Reverse Proxy' or 'Remote'. +It is composed of the client and the server. You can access any of your terminals through a web browser based on the MAC address. `Keep Watching for More Actions on This Space` -![](https://github.com/zhaojh329/xttyd/blob/master/xttyd.png) +![](https://github.com/zhaojh329/rtty/blob/master/rtty.png) # Dependencies for Server side * [python3](https://www.python.org) @@ -26,25 +25,25 @@ xTTYD can share the shell of your device based on the MAC address you specify. add new feed into "feeds.conf.default": src-git libuwsc https://github.com/zhaojh329/libuwsc-feed.git - src-git xttyd https://github.com/zhaojh329/xttyd-feed.git + src-git rtty https://github.com/zhaojh329/rtty-feed.git -Install xttyd packages: +Install rtty packages: - ./scripts/feeds update libuwsc xttyd - ./scripts/feeds install -a -p xttyd + ./scripts/feeds update libuwsc rtty + ./scripts/feeds install -a -p rtty -Select package xttyd in menuconfig and compile new image. +Select package rtty in menuconfig and compile new image. Utilities ---> Terminal ---> - <*> xttyd................................... Share your terminal over the web + <*> rtty................................... Share your terminal over the web Configuring the server parameter - uci set xttyd.@server[0].host='your server host' - uci set xttyd.@server[0].port='your server port' + uci set rtty.@server[0].host='your server host' + uci set rtty.@server[0].port='your server port' uci commit - /etc/init.d/xttyd restart + /etc/init.d/rtty restart # Deploying the server side Install dependencies @@ -54,20 +53,20 @@ Install dependencies clone code - git clone https://github.com/zhaojh329/xttyd.git + git clone https://github.com/zhaojh329/rtty.git Manual run - cd xttyd/server && ./xttyd.py -p 5912 + cd rtty/server && ./rtty.py -p 5912 Install the automatic boot script sudo ./install.sh - sudo /etc/init.d/xttyd start + sudo /etc/init.d/rtty start -# Use your browser to access your server +# Use your web browser to access your server, then enter the MAC address of the terminal you want to access, and then click the connection button http://your-server-host:5912 # Contributing -If you would like to help making [xttyd](https://github.com/zhaojh329/xttyd) better, -see the [CONTRIBUTING.md](https://github.com/zhaojh329/xttyd/blob/master/CONTRIBUTING.md) file. +If you would like to help making [rtty](https://github.com/zhaojh329/rtty) better, +see the [CONTRIBUTING.md](https://github.com/zhaojh329/rtty/blob/master/CONTRIBUTING.md) file. diff --git a/README_ZH.md b/README_ZH.md index 962e861..68f1ca2 100755 --- a/README_ZH.md +++ b/README_ZH.md @@ -1,4 +1,4 @@ -# xTTYD +# rtty ![](https://img.shields.io/badge/license-GPLV3-brightgreen.svg?style=plastic "License") @@ -6,12 +6,15 @@ [libubox]: https://git.openwrt.org/?p=project/libubox.git [libuwsc]: https://github.com/zhaojh329/libuwsc -通过Web分享你的终端。与[ttyd]不同的是,xTTYD由服务端和客户端两部分组成。 -xTTYD可以根据你指定的MAC地址分享你的设备的Shell。 +通过Web分享你的终端。与[ttyd]不同的是,rtty由服务端和客户端两部分组成。 +rtty可以根据你指定的MAC地址分享你的设备的Shell。 + +通过Web浏览器访问你的终端。项目名称里面的“r”是指“反向代理”或者“远程”。它由客户端和服务端组成。 +你可以根据MAC地址通过Web浏览器访问你的任意一台终端。 `请保持关注以获取最新的项目动态` -![](https://github.com/zhaojh329/xttyd/blob/master/xttyd.png) +![](https://github.com/zhaojh329/rtty/blob/master/rtty.png) # 服务端依赖 * [python3](https://www.python.org) @@ -26,25 +29,25 @@ xTTYD可以根据你指定的MAC地址分享你的设备的Shell。 add new feed into "feeds.conf.default": src-git libuwsc https://github.com/zhaojh329/libuwsc-feed.git - src-git xttyd https://github.com/zhaojh329/xttyd-feed.git + src-git rtty https://github.com/zhaojh329/rtty-feed.git -Install xttyd packages: +Install rtty packages: - ./scripts/feeds update libuwsc xttyd - ./scripts/feeds install -a -p xttyd + ./scripts/feeds update libuwsc rtty + ./scripts/feeds install -a -p rtty -Select package xttyd in menuconfig and compile new image. +Select package rtty in menuconfig and compile new image. Utilities ---> Terminal ---> - <*> xttyd................................... Share your terminal over the web + <*> rtty................................... Share your terminal over the web 配置服务器参数 - uci set xttyd.@server[0].host='your server host' - uci set xttyd.@server[0].port='your server port' + uci set rtty.@server[0].host='your server host' + uci set rtty.@server[0].port='your server port' uci commit - /etc/init.d/xttyd restart + /etc/init.d/rtty restart # 部署服务端 安装依赖 @@ -54,23 +57,23 @@ Select package xttyd in menuconfig and compile new image. 克隆代码 - git clone https://github.com/zhaojh329/xttyd.git + git clone https://github.com/zhaojh329/rtty.git 手动运行 - cd xttyd/server && ./xttyd.py -p 5912 + cd rtty/server && ./rtty.py -p 5912 安装自启动脚本,后台运行 sudo ./install.sh - sudo /etc/init.d/xttyd start + sudo /etc/init.d/rtty start -# 使用你的浏览器访问你的服务器 +# 使用你的Web浏览器访问你的服务器,然后输入你要访问的终端的MAC地址,然后点击连接按钮。 http://your-server-host:5912 # 贡献代码 -如果你想帮助[xttyd](https://github.com/zhaojh329/xttyd)变得更好,请参考 -[CONTRIBUTING_ZH.md](https://github.com/zhaojh329/xttyd/blob/master/CONTRIBUTING_ZH.md)。 +如果你想帮助[rtty](https://github.com/zhaojh329/rtty)变得更好,请参考 +[CONTRIBUTING_ZH.md](https://github.com/zhaojh329/rtty/blob/master/CONTRIBUTING_ZH.md)。 # 技术交流 QQ群:153530783 diff --git a/xttyd.png b/rtty.png similarity index 100% rename from xttyd.png rename to rtty.png diff --git a/server/install.sh b/server/install.sh index 392199e..7177e22 100755 --- a/server/install.sh +++ b/server/install.sh @@ -1,10 +1,10 @@ #!/bin/sh -update-rc.d xttyd remove -rm -rf /var/www/xttyd +update-rc.d rtty remove +rm -rf /var/www/rtty -mkdir -p /var/www/xttyd -cp -r www/* /var/www/xttyd -cp xttyd.py /usr/sbin/ -cp xttyd.init /etc/init.d/xttyd -update-rc.d xttyd defaults +mkdir -p /var/www/rtty +cp -r www/* /var/www/rtty +cp rtty.py /usr/sbin/ +cp rtty.init /etc/init.d/rtty +update-rc.d rtty defaults diff --git a/server/xttyd.init b/server/rtty.init similarity index 70% rename from server/xttyd.init rename to server/rtty.init index 8a15dc4..c23df95 100755 --- a/server/xttyd.init +++ b/server/rtty.init @@ -1,6 +1,6 @@ #! /bin/sh ### BEGIN INIT INFO -# Provides: xttyd +# Provides: rtty # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 @@ -13,17 +13,17 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/lsb/init-functions -XTTYDPID=/var/run/xttyd.pid +RTTYPID=/var/run/rtty.pid PORT=5912 do_start () { - start-stop-daemon --start --make-pidfile --pidfile $XTTYDPID --background --exec /usr/sbin/xttyd.py -- -p $PORT -d /var/www/xttyd + start-stop-daemon --start --make-pidfile --pidfile $RTTYPID --background --exec /usr/sbin/rtty.py -- -p $PORT -d /var/www/rtty } do_stop () { - start-stop-daemon --stop --pidfile $XTTYDPID + start-stop-daemon --stop --pidfile $RTTYPID sleep 1 - rm -f $XTTYDPID + rm -f $RTTYPID } case "$1" in diff --git a/server/xttyd.py b/server/rtty.py similarity index 100% rename from server/xttyd.py rename to server/rtty.py diff --git a/server/www/xttyd.html b/server/www/rtty.html similarity index 93% rename from server/www/xttyd.html rename to server/www/rtty.html index f016c83..1114c82 100755 --- a/server/www/xttyd.html +++ b/server/www/rtty.html @@ -2,7 +2,7 @@ - xTTYD + RTTY @@ -12,13 +12,13 @@
-

xTTYD

+

RTTY

-

Copyright © 2018 zhaojh329 Github

+

Copyright © 2018 zhaojh329 Github