From dd31e7a2bce80f0f9b980b1839950255a848b693 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 20 Nov 2021 20:03:12 +0100 Subject: tunnel: add gRPC over unix domain socket to the go backend With gRPC it will be easier to extend the go backend API. In this commit the Version function is reimplemented in gRPC. Gitignore generated protobuf files. --- tunnel/src/main/proto/libwg.proto | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tunnel/src/main/proto/libwg.proto (limited to 'tunnel/src/main/proto') diff --git a/tunnel/src/main/proto/libwg.proto b/tunnel/src/main/proto/libwg.proto new file mode 100644 index 00000000..2d964897 --- /dev/null +++ b/tunnel/src/main/proto/libwg.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +option java_multiple_files = true; +option java_package = 'com.wireguard.android.backend.gen'; +option java_outer_classname = "LibwgProto"; +option java_generic_services = true; +option go_package = 'golang.zx2c4.com/wireguard/android/gen'; + +package api; + +service Libwg { + rpc StopGrpc(StopGrpcRequest) returns (StopGrpcResponse); + rpc Version(VersionRequest) returns (VersionResponse); +} + +message StopGrpcRequest { +} + +message StopGrpcResponse { +} + +message VersionRequest { +} + +message VersionResponse { + string version = 1; +} -- cgit v1.2.3