summaryrefslogtreecommitdiffhomepage
path: root/tunnel/src/main/proto/libwg.proto
diff options
context:
space:
mode:
Diffstat (limited to 'tunnel/src/main/proto/libwg.proto')
-rw-r--r--tunnel/src/main/proto/libwg.proto28
1 files changed, 28 insertions, 0 deletions
diff --git a/tunnel/src/main/proto/libwg.proto b/tunnel/src/main/proto/libwg.proto
index e633ea46..24758940 100644
--- a/tunnel/src/main/proto/libwg.proto
+++ b/tunnel/src/main/proto/libwg.proto
@@ -15,6 +15,7 @@ service Libwg {
rpc StopHttpProxy(StopHttpProxyRequest) returns (StopHttpProxyResponse);
rpc Reverse(stream ReverseRequest) returns (stream ReverseResponse);
rpc IpcSet(IpcSetRequest) returns (IpcSetResponse);
+ rpc TurnOn(TurnOnRequest) returns (TurnOnResponse);
}
message TunnelHandle { int32 handle = 1; }
@@ -39,6 +40,17 @@ message InetSocketAddress {
uint32 port = 2;
}
+message InetPrefix {
+ InetAddress address = 1;
+ uint32 prefixLenght = 2;
+}
+
+enum TurnOnFlags {
+ NONE = 0x00;
+ ENABLE_DHCP = 0x01;
+ ENABLE_FOOBAR = 0x04;
+}
+
message StopGrpcRequest {
}
@@ -101,3 +113,19 @@ message IpcSetRequest {
message IpcSetResponse {
Error error = 1;
}
+
+message TurnOnRequest {
+ string interfaceName = 1;
+ int32 tunFd = 2;
+ string settings = 3;
+ // Bitwise-OR of TurnOnFlags.
+ optional uint32 flags = 4;
+ optional InetAddress linkLocalAddr = 5;
+}
+
+message TurnOnResponse {
+ Error error = 1;
+ TunnelHandle tunnel = 2;
+ repeated InetPrefix addresses = 3;
+ // TODO add dns servers etc.
+}