wsproxy/server/tools/protobuild/ss_proto.proto
2023-06-05 09:36:21 +00:00

102 lines
2.6 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package ss;
message SS_WSP_SocketDisconnect
{
}
message SS_CMPing
{
}
message SS_SMPing
{
optional int32 param1 = 1; optional int32 source = 2 [default = 0]; //0:tcp 1:udp
}
message SS_CMLogin_CMReConnect_CommonHead
{
optional int32 server_id = 1;
}
message SS_CMKcpHandshake
{
optional int32 proto_version = 1; //协议版本号Constant_e.ProtoVersion
optional string account_id = 2; //账号id
optional string session_id = 3; //session id
optional string team_uuid = 4; //保留
optional int32 secret_key_place = 5; //私钥存放位置 0存在用户协议前(老) 1存在kcp底层协议头之后(新)
}
message SS_SMKcpHandshake
{
optional int32 errcode = 1; //errcode != 0时表示不支持kcp
optional string errmsg = 2; //errmsg
optional int32 conv = 3; //用来作为客户端的conv
optional bytes secret_key = 4; //secret key客户端每次上报的时候加在包头之前
optional string remote_host = 5; //host
optional int32 remote_port = 6; //port
}
message SS_CMLogin
{
optional int32 server_id = 1; //保留
optional string team_uuid = 2; //保留
optional string account_id = 3; //账号id
optional int32 proto_version = 5; //协议版本号Constant_e.ProtoVersion
optional string session_id = 20; //账号id
}
message SS_CMReconnect
{
optional int32 server_id = 1; //保留
optional string team_uuid = 2; //保留
optional string account_id = 3; //账号id
optional string session_id = 4; //session_id
optional string room_uuid = 5; //房间唯一id
optional string server_info = 6; //服务器信息
}
message SS_WSP_RequestTargetServer
{
optional int64 context_id = 1;
optional string account_id = 2;
optional string team_id = 3;
optional string server_info = 4;
optional int32 is_reconnect = 5;
optional int32 proto_version = 6; //协议版本号Constant_e.ProtoVersion
optional string url = 7;
optional string query_str = 8;
optional string session_id = 9;
}
message SS_MS_ResponseTargetServer
{
optional int32 error_code = 1;
optional string error_msg = 2;
optional int64 context_id = 3;
optional string host = 4;
optional int32 port = 5;
}
message SS_SMRpcError
{
optional int32 error_code = 1;
optional string error_msg = 2;
optional string debug_msg = 3;
optional string file = 4;
optional int32 lineno = 5;
}
message SS_Ping
{
}
message SS_Pong
{
optional int32 param1 = 1;
}
message SS_ForceCloseSocket
{
}