- 它可以系统不同、远程无感、多台设备进行同步数据(例如:同步工作目录、同步消息列表)。
- 使用命令远程控制设备行为。
- 加密传输消息内容。
- 去中心化,拒绝无条件信任第三者。
- 同步操作会在多个设备间进行
- 远程控制桌面(实验性)。
当前项目贡献者:
Bt(Bt_Asker)
状态:制作中未完成, 而且也没有test
PS:
这只是一个练习网络编程顺带制作的小程序啦...希望会有人喜欢。 您可以自由开发(但是Bt更希望您能带带它||ヽ( ̄▽ ̄)ノミ|Ю)
。没有使用 ftp 等现成库,而且想让它成为一个在同一网络下无感高性能地同步文件的工具。
-
客户端:
-
指令发送端口:
[随机可用端口]
-
数据传输端口:
[随机可用端口]
-
服务端:
-
数据传输端口:
[server_port]
-
指令端口:
[server_port + 1]
核心权限分级:
guest(主要用于验证是否为用户):0
user(主要用于安全范围内的文件操作):10
admin(使用shell远程控制主机等全部权限):20
内部Socket传输指令规范:
客户端发送至服务端指令套接字:
指令以 随机8字节的Mark 开头,并且连接字典来传递参数。
在后续的异步发送文件中,每一条指令的发送会自动加上 8个字节的mark 标识。
——————————————————————————————————————————————————
更改指令格式为:
[8bytesMark]{
"command": "data"/"comm", # 命令类型(数据类型/命令类型)
"type": "file", # 操作类型(具体操作方式)
"method": "get", # 操作方法(get/post 获取与提交)
"data": { # 参数数据集(具体参数)
"a": 1
....
}
}
——————————————————————————————————————————————————
服务端答复至客户端指令套接字:
——————————————————————————————————————————————————
更改使用TimeDict实现数据的总体接收与解密。
——————————————————————————————————————————————————
本同步工具使用 相对路径同步 :
每个主机的同步空间路径没有必要保持一致:
1.当主机A发送文件同步请求,会首先在索引文件中寻找当前文件信息。
2.主机B接收文件时会根据同步空间名称来推断对方发送的文件路径。
A. SpaceName | ./a/b/c.txt。
B. 查询SpaceName的路径信息,与 ./a/b/c.txt 相连接得到文件绝对路径。
最后:有一部分是故意重造轮子,用于练习的