Files
natpass/code/network/msg.proto
T
2021-11-15 17:41:19 +08:00

56 lines
1.3 KiB
Protocol Buffer

syntax = "proto3";
package network;
option go_package="./;network";
import "connect.proto";
import "forward.proto";
import "shell.proto";
import "vnc.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_resize = 10;
shell_data = 11;
// vnc
vnc_ctrl = 20;
vnc_image = 21;
vnc_mouse = 22;
vnc_keyboard = 23;
vnc_cad = 24; // ctrl+alt+del
vnc_scroll = 25;
}
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_resize sresize = 20;
shell_data sdata = 21;
// vnc
vnc_control vctrl = 30;
vnc_image vimg = 31;
vnc_mouse vmouse = 32;
vnc_keyboard vkbd = 33;
vnc_scroll vscroll = 34;
}
}