支持自定义ip、服务端tcp通道、可选择禁止p2p

This commit is contained in:
lubeilin
2023-07-24 00:42:27 +08:00
parent 2f7817ce5b
commit 9b42c5d092
147 changed files with 1078 additions and 1754 deletions
+46
View File
@@ -0,0 +1,46 @@
syntax = "proto3";
message RegistrationRequest{
string token = 1;
string device_id = 2;
string name = 3;
bool is_fast = 4;
string version = 5;
fixed32 virtual_ip = 6;
bool allow_ip_change = 7;
}
message RegistrationResponse{
fixed32 virtual_ip = 1;
fixed32 virtual_gateway = 2;
fixed32 virtual_netmask = 3;
uint32 epoch = 4;
repeated DeviceInfo device_info_list = 5;
fixed32 public_ip = 6;
uint32 public_port = 7;
bytes public_ipv6 = 8;
}
message DeviceInfo{
string name = 1;
fixed32 virtual_ip = 2;
uint32 device_status = 3;
}
message DeviceList{
uint32 epoch = 1;
repeated DeviceInfo device_info_list = 2;
}
message PunchInfo{
repeated fixed32 public_ip_list = 2;
uint32 public_port = 3;
uint32 public_port_range = 4;
PunchNatType nat_type = 5;
bool reply = 6;
fixed32 local_ip = 7;
uint32 local_port = 8;
repeated bytes public_ipv6_list = 9;
}
enum PunchNatType{
Symmetric = 0;
Cone = 1;
}