syntax = "proto3"; package protocol; option optimize_for = SPEED; option go_package = "go.miragespace.co/specter/spec/protocol"; import "spec/proto/node.proto"; message Stream { enum Type { UNKNOWN_TYPE = 0; RPC = 1; // used for rpc between nodes and between client/server DIRECT = 2; // used for establishing the reverse proxy from the tunneling node to client PROXY = 3; // used when client is not directly connected to the tunneling node INTERNAL = 4; // used for /_internal endpoint proxying between nodes } Type type = 1; Node target = 2; } message Datagram { enum Type { UNKNOWN = 0; ALIVE = 1; DATA = 2; RTT_SYN = 3; RTT_ACK = 4; } Type type = 1; bytes data = 2; } message Connection { enum State { UNKNOWN_STATE = 0; CACHED = 1; FRESH = 2; } enum Direction { UNKNOWN_DIRECTION = 0; INCOMING = 1; OUTGOING = 2; } Node identity = 1; State cache_state = 2; Direction cache_direction = 3; string version = 5; }