Files
natpass/code/network/msg.proto
T

35 lines
705 B
Protocol Buffer

syntax = "proto3";
package network;
option go_package="./;network";
import "connect.proto";
import "forward.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;
}
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;
}
}