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.proto65
1 files changed, 65 insertions, 0 deletions
diff --git a/tunnel/src/main/proto/libwg.proto b/tunnel/src/main/proto/libwg.proto
index 2d964897..b25a10cd 100644
--- a/tunnel/src/main/proto/libwg.proto
+++ b/tunnel/src/main/proto/libwg.proto
@@ -11,6 +11,30 @@ package api;
service Libwg {
rpc StopGrpc(StopGrpcRequest) returns (StopGrpcResponse);
rpc Version(VersionRequest) returns (VersionResponse);
+ rpc StartHttpProxy(StartHttpProxyRequest) returns (StartHttpProxyResponse);
+ rpc StopHttpProxy(StopHttpProxyRequest) returns (StopHttpProxyResponse);
+ rpc Reverse(stream ReverseRequest) returns (stream ReverseResponse);
+}
+
+message TunnelHandle { int32 handle = 1; }
+
+message Error {
+ enum Code {
+ UNSPECIFIED = 0;
+ INVALID_PROTOCOL_BUFFER = 1;
+ INVALID_RESPONSE = 2;
+ }
+ Code code = 1;
+ string message = 2;
+}
+
+message InetAddress {
+ bytes address = 1;
+}
+
+message InetSocketAddress {
+ InetAddress address = 1;
+ uint32 port = 2;
}
message StopGrpcRequest {
@@ -25,3 +49,44 @@ message VersionRequest {
message VersionResponse {
string version = 1;
}
+
+message StartHttpProxyRequest {
+ string pacFileUrl = 1;
+}
+
+message StartHttpProxyResponse {
+ uint32 listen_port = 1;
+ Error error = 2;
+}
+
+message StopHttpProxyRequest {
+}
+
+message StopHttpProxyResponse {
+ Error error = 1;
+}
+
+message ReverseRequest {
+ oneof response {
+ GetConnectionOwnerUidResponse uid = 1;
+ }
+}
+
+message ReverseResponse {
+ oneof request {
+ GetConnectionOwnerUidRequest uid = 1;
+ }
+}
+
+message GetConnectionOwnerUidRequest {
+ // ConnectivityManager.getConnectionOwnerUid(int protocol,
+ // InetSocketAddress local, InetSocketAddress remote)
+ int32 protocol = 1;
+ InetSocketAddress local = 2;
+ InetSocketAddress remote = 3;
+}
+
+message GetConnectionOwnerUidResponse {
+ int32 uid = 1;
+ string package = 2; // context.getPackageManager().getNameForUid()
+}