107 lines
1.8 KiB
Cap'n Proto
107 lines
1.8 KiB
Cap'n Proto
@0x92a7c8962141ef12;
|
|
|
|
using Go = import "/go.capnp";
|
|
$Go.package("commonbackend");
|
|
$Go.import("git.terah.dev/imterah/hermes/backend/commonbackend");
|
|
|
|
enum Protocol {
|
|
tcp @0;
|
|
udp @1;
|
|
}
|
|
|
|
enum StatusCode {
|
|
success @0;
|
|
failure @1;
|
|
}
|
|
|
|
enum InResponseTo {
|
|
checkClientParameters @0;
|
|
checkServerParameters @1;
|
|
}
|
|
|
|
struct Start {
|
|
arguments @0 :Data;
|
|
}
|
|
|
|
struct Stop {}
|
|
|
|
struct AddProxy {
|
|
sourceIP @0 :Data;
|
|
sourcePort @1 :UInt16;
|
|
destPort @2 :UInt16;
|
|
protocol @3 :Protocol;
|
|
}
|
|
|
|
struct RemoveProxy {
|
|
sourceIP @0 :Data;
|
|
sourcePort @1 :UInt16;
|
|
destPort @2 :UInt16;
|
|
protocol @3 :Protocol;
|
|
}
|
|
|
|
struct ProxyStatusRequest {
|
|
sourceIP @0 :Data;
|
|
sourcePort @1 :UInt16;
|
|
destPort @2 :UInt16;
|
|
protocol @3 :Protocol;
|
|
}
|
|
|
|
struct ProxyStatusResponse {
|
|
sourceIP @0 :Data;
|
|
sourcePort @1 :UInt16;
|
|
destPort @2 :UInt16;
|
|
protocol @3 :Protocol;
|
|
isActive @4 :Bool;
|
|
}
|
|
|
|
struct ProxyInstance {
|
|
sourceIP @0 :Text;
|
|
sourcePort @1 :UInt16;
|
|
destPort @2 :UInt16;
|
|
protocol @3 :Protocol;
|
|
}
|
|
|
|
struct ProxyInstanceRequest {}
|
|
|
|
struct ProxyInstanceResponse {
|
|
proxies @0 :List(ProxyInstance);
|
|
}
|
|
|
|
struct BackendStatusRequest {}
|
|
|
|
struct BackendStatusResponse {
|
|
isRunning @0 :Bool;
|
|
statusCode @1 :StatusCode;
|
|
message @2 :Text;
|
|
}
|
|
|
|
struct Connection {
|
|
sourceIP @0 :Data;
|
|
sourcePort @1 :UInt16;
|
|
destPort @2 :UInt16;
|
|
clientIP @3 :Data;
|
|
clientPort @4 :UInt16;
|
|
}
|
|
|
|
struct ProxyConnectionsRequest {}
|
|
|
|
struct ProxyConnectionsResponse {
|
|
connections @0 :List(Connection);
|
|
}
|
|
|
|
struct CheckClientParameters {
|
|
sourceIP @0 :Data;
|
|
sourcePort @1 :UInt16;
|
|
destPort @2 :UInt16;
|
|
protocol @3 :Protocol;
|
|
}
|
|
|
|
struct CheckServerParameters {
|
|
arguments @0 :Data;
|
|
}
|
|
|
|
struct CheckParametersResponse {
|
|
inResponseTo @0 :InResponseTo;
|
|
isValid @1 :Bool;
|
|
message @2 :Text;
|
|
}
|