Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Primitive Domain Socket Support described in https://github.com/v2ray/Planning/issues/25 #1019

Merged
merged 31 commits into from
Apr 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
71c3e81
Rebase: Add domainsocket receiver config
xiaokangwang Feb 12, 2018
d845b4c
Created listener file
xiaokangwang Oct 31, 2017
c3cdd90
fix and generate protobuf
xiaokangwang Oct 31, 2017
fdfa49d
modify golang package name
xiaokangwang Oct 31, 2017
5a7c49f
Added Generated error helper
xiaokangwang Nov 3, 2017
a6612a2
Regenerate Pb
xiaokangwang Nov 3, 2017
8fe5326
Added function Stub
xiaokangwang Nov 3, 2017
b9dddd0
Added Dialer stub
xiaokangwang Nov 22, 2017
7afd26a
Type switch for UnixReceiver
xiaokangwang Dec 28, 2017
7b51a56
Fix pb err
xiaokangwang Dec 28, 2017
7f34cbd
Add Generated Files
xiaokangwang Dec 28, 2017
5e0ed59
added function stub for UnixReceiverHandler Instancer
xiaokangwang Dec 28, 2017
91f32cc
Auto Gen
xiaokangwang Feb 12, 2018
43abfc9
Unix listeners(sync commit)
xiaokangwang Mar 11, 2018
8e5063d
(Sync Commit)
xiaokangwang Mar 16, 2018
3b1f0ae
finish transport listener
xiaokangwang Mar 18, 2018
3e05a35
finish UnixInboundHandler
xiaokangwang Mar 18, 2018
09bf78a
notify progressTraffic to quit
xiaokangwang Mar 18, 2018
a00c076
Pass unused data into Receiver
xiaokangwang Mar 28, 2018
b67cd22
Test and bug fix
xiaokangwang Mar 29, 2018
c51830b
Added UnixSenderConfig
xiaokangwang Apr 4, 2018
7e96581
Added integration
xiaokangwang Apr 4, 2018
176a5c0
generalize interface
xiaokangwang Apr 4, 2018
d08929a
finish up dial
xiaokangwang Apr 5, 2018
4e609c9
Added Test for dial
xiaokangwang Apr 5, 2018
8b881d7
Rename to prevent confusion
xiaokangwang Apr 5, 2018
12012cd
Testing and fixs
xiaokangwang Apr 5, 2018
c542c04
Merge branch 'master' of github.com:v2ray/v2ray-core into domainsocket
xiaokangwang Apr 5, 2018
8e1507a
Prevent unuseful test failure
xiaokangwang Apr 5, 2018
6d1faf5
Remove staging code
xiaokangwang Apr 5, 2018
00016e0
Add comment
xiaokangwang Apr 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Rebase: Add domainsocket receiver config
  • Loading branch information
xiaokangwang committed Feb 12, 2018
commit 71c3e81a7e3b04f9c77c5f614934eebdcd7c11ff
18 changes: 17 additions & 1 deletion app/proxyman/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}
Expand Down Expand Up @@ -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 {
Expand Down
40 changes: 40 additions & 0 deletions transport/internet/domainsocket/config.proto
Original file line number Diff line number Diff line change
@@ -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;
}