diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2022-03-29 23:51:21 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-07-05 21:41:01 +0200 |
commit | 9ff334388138d837f861cd01d2f6f9f95376b691 (patch) | |
tree | 58537c8be12f4630aafc1f0d911ae4321d643a34 /tunnel/src/main/proto/libwg.proto | |
parent | 42fdae4b273e787deb394b9a1011310052346c6a (diff) |
ui,tunnel: implement http proxy for Android 10+
Allow getting package names of tv apps.
Diffstat (limited to 'tunnel/src/main/proto/libwg.proto')
-rw-r--r-- | tunnel/src/main/proto/libwg.proto | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tunnel/src/main/proto/libwg.proto b/tunnel/src/main/proto/libwg.proto index 4c741b15..da6f6da4 100644 --- a/tunnel/src/main/proto/libwg.proto +++ b/tunnel/src/main/proto/libwg.proto @@ -11,6 +11,9 @@ 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 Error { @@ -24,6 +27,15 @@ message Error { string message = 2; } +message InetAddress { + bytes address = 1; +} + +message InetSocketAddress { + InetAddress address = 1; + uint32 port = 2; +} + message StopGrpcRequest { } @@ -36,3 +48,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() +} |