fix proto.message

This commit is contained in:
anlicheng 2026-02-13 14:11:44 +08:00
parent 2ff9cf51ce
commit 21e26c3ab2

View File

@ -13,37 +13,38 @@ message SDLV6Info {
bytes v6 = 2;
}
//
message SDLDevAddr {
uint32 network_id = 1;
bytes mac = 2;
uint32 net_addr = 3;
uint32 net_bit_len = 4;
string network_domain = 5;
}
// super之间采用了quic协议通讯
// : <<Len:16, Data/binary>>
// : <<PacketId:32, PacketType:8, Payload/binary>>
// tcp通讯消
// quic
message SDLEmpty {
}
// ,
message SDLRegisterSuper {
uint32 version = 1;
string installed_channel = 2;
string client_id = 3;
SDLDevAddr dev_addr = 4;
string pub_key = 5;
string token = 6;
string network_code = 7;
string hostname = 8;
string client_id = 2;
// https请求分配了
// (network_id, mac, ip, mask_len, hostname)
uint32 network_id = 3;
bytes mac = 4;
uint32 ip = 5;
uint32 mask_len = 6;
string hostname = 7;
string pub_key = 8;
// 使http协议请求后端token或者账号密码登录时, access_token;
// RegisterSuper的时候 (access_token)
string access_token = 9;
}
// https的接口里面去完成
// quic去通讯session_token校验
message SDLRegisterSuperAck {
SDLDevAddr dev_addr = 1;
bytes aes_key = 2;
uint32 upgrade_type = 3;
optional string upgrade_prompt = 4;
optional string upgrade_address = 5;
bytes aes_key = 1;
bytes session_token = 2;
}
message SDLRegisterSuperNak {
@ -63,6 +64,35 @@ message SDLPeerInfo {
optional SDLV6Info v6_info = 3;
}
// ARP查询相关
// arp请求是通过广播的形式获取到的macos这种tun的实现arp请求包的
// mac对应的ip地址的广
message SDLArpRequest {
uint32 target_ip = 1;
}
message SDLArpResponse {
uint32 target_ip = 1;
bytes target_mac = 2;
}
//
message SDLPolicyRequest {
uint32 src_identity_id = 1;
uint32 dst_identity_id = 2;
uint32 version = 3;
}
// quic通讯rules部分已经没有了长度限制
message SDLPolicyResponse {
uint32 src_identity_id = 1;
uint32 dst_identity_id = 2;
// ;
uint32 version = 3;
// 4+1+2
bytes rules = 4;
}
//
message SDLNatChangedEvent {
@ -82,30 +112,9 @@ message SDLNetworkShutdownEvent {
string message = 1;
}
//
message SDLChangeNetworkCommand {
SDLDevAddr dev_addr = 1;
bytes aes_key = 2;
}
message SDLCommandAck {
// status = true, status = false message是失败原因描述
bool status = 1;
optional string message = 2;
}
message SDLFlows {
//
uint32 forward_num = 1;
// p2p直接流量
uint32 p2p_num = 2;
//
uint32 inbound_num = 3;
}
// UDP通讯消息
// client和stun之间的心跳包super的udp之间的存活逻辑
message SDLStunRequest {
uint32 cookie = 1;
string client_id = 2;
@ -127,8 +136,31 @@ message SDLData {
bool is_p2p = 4;
uint32 ttl = 5;
bytes data = 6;
bytes session_token = 7;
// https登录的时候
//
uint32 identity_id = 8;
}
//
message SDLStunProbe {
uint32 cookie = 1;
uint32 attr = 2;
// step是为了方便端上判断
uint32 step = 3;
}
message SDLStunProbeReply {
uint32 cookie = 1;
// step是为了方便端上判断
uint32 step = 2;
uint32 port = 3;
uint32 ip = 4;
}
// Node-Node之间的握手逻辑, udp传输的
message SDLRegister {
uint32 network_id = 1;
bytes src_mac = 2;
@ -139,17 +171,4 @@ message SDLRegisterAck {
uint32 network_id = 1;
bytes src_mac = 2;
bytes dst_mac = 3;
}
//
message SDLStunProbe {
uint32 cookie = 1;
uint32 attr = 2;
}
message SDLStunProbeReply {
uint32 cookie = 1;
uint32 port = 2;
uint32 ip = 3;
}