diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-02-11 20:18:54 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-02-11 20:18:54 +0100 |
commit | 89c6fdac75494e608608c57db75476f69bf88a63 (patch) | |
tree | d54c75ce15dd6469f4f1bb7bfb2fd9af851b83c9 /tunnel/src | |
parent | 8cd49f9a8d3e14568d7c0fda696fe62efb14d0e9 (diff) |
WIP: grpc-turnongrpc-turnon
Diffstat (limited to 'tunnel/src')
-rw-r--r-- | tunnel/src/main/proto/libwg.proto | 28 |
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. +} |