Files
natpass/code/network/msg.proto
T
2021-09-27 17:02:56 +08:00

45 lines
980 B
Protocol Buffer

syntax = "proto3";
package network;
option go_package="./;network";
import "connect.proto";
import "forward.proto";
import "shell.proto";
message handshake_payload {
bytes enc = 1;
}
message msg {
enum type {
unknown = 0;
handshake = 1;
keepalive = 2;
connect_req = 3;
connect_rep = 4;
disconnect = 5;
forward = 6;
// shell
shell_create = 10;
shell_resize = 11;
shell_data = 12;
shell_close = 13;
}
type _type = 1;
string from = 2;
uint32 from_idx = 3;
string to = 4;
uint32 to_idx = 5;
string link_id = 6;
oneof payload {
handshake_payload hsp = 10;
connect_request creq = 11;
connect_response crep = 12;
data _data = 13;
// shell
shell_create screate = 20;
shell_resize sresize = 21;
shell_data sdata = 22;
}
}