Skip to content

Commit

Permalink
Use lrzsz to transfer file
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
Jianhui Zhao committed Sep 25, 2018
1 parent 1bcbab9 commit ef96054
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 510 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[![Build Status][9]][10]

[Xterm.js]: https://github.com/xtermjs/xterm.js
[lrzsz]: https://ohse.de/uwe/software/lrzsz.html
[libev]: http://software.schmorp.de/pkg/libev.html
[libuwsc]: https://github.com/zhaojh329/libuwsc
[openssl]: https://github.com/openssl/openssl
Expand All @@ -42,9 +43,8 @@ the world.
* Access different devices based on device ID
* Provide a dashboard to visualize online devices
* Fully-featured terminal based on [Xterm.js]
* Support transfer file with [lrzsz]
* SSL support: openssl, mbedtls, CyaSSl(wolfssl)
* Support upload file to device
* Support download file from devices
* Support Execute a command remote
* The client is very small, suitable for embedded Linux: rtty(24K) + libev(48.5K) + libuwsc(24K) + libwolfssl(595.9K) = 692.4K

Expand Down
4 changes: 2 additions & 2 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[![Build Status][9]][10]

[Xterm.js]: https://github.com/xtermjs/xterm.js
[lrzsz]: https://ohse.de/uwe/software/lrzsz.html
[libev]: http://software.schmorp.de/pkg/libev.html
[libuwsc]: https://github.com/zhaojh329/libuwsc
[openssl]: https://github.com/openssl/openssl
Expand All @@ -39,9 +40,8 @@ rtty非常适合远程维护你的或者你公司的部署在全球各地的成
* 根据设备ID访问不同的设备
* 提供dashboard,直观的展示在线设备
* 基于[Xterm.js]的全功能终端
* 支持使用[lrzsz]传输文件
* 支持SSL: openssl, mbedtls, CyaSSl(wolfssl)
* 支持上传文件到设备
* 支持从设备下载文件
* 支持远程执行命令
* 客户端非常小,适合嵌入式Linux: rtty(24K) + libev(48.5K) + libuwsc(24K) + libwolfssl(595.9K) = 692.4K

Expand Down
102 changes: 43 additions & 59 deletions rtty.proto
Original file line number Diff line number Diff line change
@@ -1,67 +1,51 @@
syntax = "proto3";
// protoc-c --c_out=. rtty.proto
// protoc --go_out=. rtty.proto

syntax = "proto3";

message rtty_message {
enum Type {
UNKNOWN = 0;
LOGIN = 1;
LOGINACK = 2;
LOGOUT = 3;
TTY = 4;
UPFILE = 5;
DOWNFILE = 6;
COMMAND = 7;
WINSIZE = 8;
}

enum LoginCode {
OK = 0;
OFFLINE = 1;
}

enum FileCode {
START = 0;
RATELIMIT = 1;
FILEDATA = 2;
CANCELED = 3;
END = 4;
}
enum Type {
UNKNOWN = 0;
LOGIN = 1;
LOGINACK = 2;
LOGOUT = 3;
TTY = 4;
COMMAND = 5;
WINSIZE = 6;
}

enum CommandErr {
NONE = 0;
TIMEOUT = 1;
NOTFOUND = 2;
READ = 3;
PERMISSION = 4;
SYSCALL = 5;
DEV_OFFLINE = 6;
CMD_REQUIRED = 7;
DEVID_REQUIRED = 8;
}
enum LoginCode {
OK = 0;
OFFLINE = 1;
}

message File {
string name = 1;
bool dir = 2;
uint64 mtime = 3;
uint64 size = 4;
enum CommandErr {
NONE = 0;
TIMEOUT = 1;
NOTFOUND = 2;
READ = 3;
PERMISSION = 4;
SYSCALL = 5;
DEV_OFFLINE = 6;
CMD_REQUIRED = 7;
DEVID_REQUIRED = 8;
}

uint32 version = 1;
Type type = 2;
string sid = 3;
int32 code = 4;
bytes data = 5;
string name = 6;
uint32 size = 7;
uint32 id = 8;
int32 err = 9;
string username = 10;
string password = 11;
string std_out = 12;
string std_err = 13;
repeated string params = 14;
map<string, string> env = 15;
repeated File filelist = 16;
uint32 cols = 17;
uint32 rows = 18;
uint32 version = 1;
Type type = 2;
string sid = 3;
int32 code = 4;
bytes data = 5;
string name = 6;
uint32 size = 7;
uint32 id = 8;
int32 err = 9;
string username = 10;
string password = 11;
string std_out = 12;
string std_err = 13;
repeated string params = 14;
map<string, string> env = 15;
uint32 cols = 16;
uint32 rows = 17;
}
Loading

0 comments on commit ef96054

Please sign in to comment.