From 71c3e81a7e3b04f9c77c5f614934eebdcd7c11ff Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Mon, 12 Feb 2018 14:07:16 +0800 Subject: [PATCH] Rebase: Add domainsocket receiver config --- app/proxyman/config.proto | 18 ++++++++- transport/internet/domainsocket/config.proto | 40 ++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 transport/internet/domainsocket/config.proto diff --git a/app/proxyman/config.proto b/app/proxyman/config.proto index 15f2171e..d4776a14 100644 --- a/app/proxyman/config.proto +++ b/app/proxyman/config.proto @@ -9,6 +9,7 @@ option java_multiple_files = true; import "v2ray.com/core/common/net/address.proto"; import "v2ray.com/core/common/net/port.proto"; import "v2ray.com/core/transport/internet/config.proto"; +import "v2ray.com/core/transport/internet/domainsocketconfig.proto"; message InboundConfig { } @@ -60,8 +61,23 @@ message ReceiverConfig { repeated KnownProtocols domain_override = 7; } +message UnixReceiverConfig { + reserved 1; + DomainSocketSettings domainSockSettings = 2; + reserved 3; + v2ray.core.transport.internet.StreamConfig stream_settings = 4; + reserved 5,6; + repeated KnownProtocols domain_override = 7; +} + +message InboundHandlerConfig { + string tag = 1; + v2ray.core.common.serial.TypedMessage receiver_settings = 2; + v2ray.core.common.serial.TypedMessage proxy_settings = 3; +} + message OutboundConfig { - + } message SenderConfig { diff --git a/transport/internet/domainsocket/config.proto b/transport/internet/domainsocket/config.proto new file mode 100644 index 00000000..c2283278 --- /dev/null +++ b/transport/internet/domainsocket/config.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package v2ray.core.internet.domainsocket; + +//Flag Array +enum DomainSocketSecurityMode { + Danger = 0; + //Verfify is Dialer have a pid or ppid match pid file + VerifyPid = 1; + //Do not tolerance ppid match + DisqualifyPPIDMatch = 2; + + //Enforce Uid Verify On euid + VerifyEUID = 4; + + //Enforce Uid Verify On ruid + VerifyRUID = 8; + + //Does not allow same user exception + DisqualifySameUser = 16; + + //Does not allow root user exception + DisqualifyRootUser = 32; +} + +message DomainSocketSecurity{ + //Flag Array Type, User can set an integer to define various configure + DomainSocketSecurityMode Mode = 1; + //Set pid files to be allowed + repeated string AllowedPid = 2; + //Set uids to be allowed, either euid or ruid should match one of following + //uids AllowedUid, or user that v2ray is running or root. + repeated uint64 AllowedUid = 3; +} + +message DomainSocketSettings{ + //Path we should listen/dial + String Path = 1; + DomainSocketSecurity Security = 2; +}