Renamed project: xttyd -> rtty

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Jianhui Zhao
2018-01-12 11:01:55 +08:00
parent 71a84a1bb9
commit c24912cf01
11 changed files with 66 additions and 64 deletions
+1 -1
View File
@@ -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/")
+3 -3
View File
@@ -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.
+3 -3
View File
@@ -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"
```
你可以使用一个你想要的分支名称。
+19 -20
View File
@@ -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.
+22 -19
View File
@@ -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
View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

+7 -7
View File
@@ -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
+5 -5
View File
@@ -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
View File
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>xTTYD</title>
<title>RTTY</title>
<link rel="stylesheet" type="text/css" href="/css/app.css"/>
<link rel="stylesheet" href="/css/xterm.css" />
<script src="/js/jquery-1.12.4.min.js"></script>
@@ -12,13 +12,13 @@
</head>
<body>
<div id="box">
<h1>xTTYD</h1>
<h1>RTTY</h1>
<input id="macaddr" type="text" required="required" placeholder="Please input macaddr" name="macaddr"></input>
<span id="msg" style="display:none; color:red;"></span>
<button id="connect" class="btn" type="button">Connect</button>
</div>
<div id="terminal-container"></div>
<h1 id="copyright" class="copyright"><font color="white">Copyright © 2018 </font><a href="https://github.com/zhaojh329/xttyd" target="_black">zhaojh329 Github</a></h1>
<h1 id="copyright" class="copyright"><font color="white">Copyright © 2018 </font><a href="https://github.com/zhaojh329/rtty" target="_black">zhaojh329 Github</a></h1>
<script>
var ws;
var term;
+3 -3
View File
@@ -7,10 +7,10 @@ find_package(Libuwsc REQUIRED)
include_directories(${LIBUWSC_INCLUDE_DIR} ${LIBUBOX_INCLUDE_DIR})
set(EXTRA_LIBS ${LIBUWSC_LIBRARY} ${LIBUBOX_LIBRARY} blobmsg_json util)
add_executable(xttyd main.c utils.c)
target_link_libraries(xttyd ${EXTRA_LIBS})
add_executable(rtty main.c utils.c)
target_link_libraries(rtty ${EXTRA_LIBS})
install(
TARGETS xttyd
TARGETS rtty
RUNTIME DESTINATION bin
)