1 Star 0 Fork 39

Bright.Yang / rttys

forked from 赵建辉 / rttys 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

rttys

license PRs Welcome Issue Welcome Release Version Build Status

这是rtty的服务器程序。

如何使用

Release页面下载编译好的二进制文件或者自己编译

git clone https://github.com/zhaojh329/rttys

cd frontend
npm install
npm run build
cd ..

./build.sh linux amd64

认证

Token

生成一个 token

$ rttys token
Please set a password:******
Your token is: 34762d07637276694b938d23f10d7164

使用 token

$rttys -t 34762d07637276694b938d23f10d7164

SSL 双向认证(mTLS)

您可以在配置文件中指定设备 CA 存储(有效文件)或在 CLI 中指定设备 CA 存储(参数 ssl-cacert) 来启用 mTLS。 存储中没有有效 CA 的设备将在 TLS 握手中断开连接。

作为Linux服务运行

移动rttys可执行程序到/usr/local/bin/

sudo mv rttys /usr/local/bin/

拷贝配置文件到/etc/rttys/

sudo mkdir /etc/rttys
sudo cp rttys.conf /etc/rttys/

创建一个systemd单元文件: /etc/systemd/system/rttys.service

[Unit]
Description=rttys
After=network.target

[Service]
ExecStart=/usr/local/bin/rttys run -c /etc/rttys/rttys.conf
TimeoutStopSec=5s

[Install]
WantedBy=multi-user.target

要首次启动该服务,请执行通常的systemctl操作:

sudo systemctl daemon-reload
sudo systemctl enable rttys
sudo systemctl start rttys

您可以通过以下方式停止服务:

sudo systemctl stop rttys

数据库准备

在数据库实例上,以root用户身份登录到数据库控制台:

mysql -u root -p

创建将由 Rttys 使用的数据库用户,通过密码验证。本例使用 “rttys” 作为密码。请为您的实例使用安全密码。

CREATE USER 'rttys' IDENTIFIED BY 'rttys';

使用 UTF-8 字符集和排序规则创建数据库。确保使用 utf8mb4 字符集而不是 utf8,因为前者支持基本多语言平面 之外的所有 Unicode字符(包括emojis)。另外,根据您期望的内容选择排序规则。如有疑问,请使用 unicode_ci 或general_ci。

CREATE DATABASE rttys CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';

将数据库上的所有权限授予上面创建的数据库用户。

GRANT ALL PRIVILEGES ON rttys.* TO 'rttys';
FLUSH PRIVILEGES;

退出数据库控制台。

贡献代码

如果你想帮助rttys变得更好,请参考 CONTRIBUTING_ZH.md

MIT License Copyright (c) 2019 Jianhui Zhao <zhaojh329@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

rtty 的服务端 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/ycxzfforever/rttys.git
git@gitee.com:ycxzfforever/rttys.git
ycxzfforever
rttys
rttys
master

搜索帮助