-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
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 d845b4c
Created listener file
xiaokangwang c3cdd90
fix and generate protobuf
xiaokangwang fdfa49d
modify golang package name
xiaokangwang 5a7c49f
Added Generated error helper
xiaokangwang a6612a2
Regenerate Pb
xiaokangwang 8fe5326
Added function Stub
xiaokangwang b9dddd0
Added Dialer stub
xiaokangwang 7afd26a
Type switch for UnixReceiver
xiaokangwang 7b51a56
Fix pb err
xiaokangwang 7f34cbd
Add Generated Files
xiaokangwang 5e0ed59
added function stub for UnixReceiverHandler Instancer
xiaokangwang 91f32cc
Auto Gen
xiaokangwang 43abfc9
Unix listeners(sync commit)
xiaokangwang 8e5063d
(Sync Commit)
xiaokangwang 3b1f0ae
finish transport listener
xiaokangwang 3e05a35
finish UnixInboundHandler
xiaokangwang 09bf78a
notify progressTraffic to quit
xiaokangwang a00c076
Pass unused data into Receiver
xiaokangwang b67cd22
Test and bug fix
xiaokangwang c51830b
Added UnixSenderConfig
xiaokangwang 7e96581
Added integration
xiaokangwang 176a5c0
generalize interface
xiaokangwang d08929a
finish up dial
xiaokangwang 4e609c9
Added Test for dial
xiaokangwang 8b881d7
Rename to prevent confusion
xiaokangwang 12012cd
Testing and fixs
xiaokangwang c542c04
Merge branch 'master' of github.com:v2ray/v2ray-core into domainsocket
xiaokangwang 8e1507a
Prevent unuseful test failure
xiaokangwang 6d1faf5
Remove staging code
xiaokangwang 00016e0
Add comment
xiaokangwang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
Add comment
- Loading branch information
commit 00016e0517e3eaf5acfa179040f03869fa539270
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,9 @@ func (ls *Listener) LowerUP() error { | |
} | ||
return err | ||
} | ||
|
||
|
||
//If the unix domain socket is filesystem based, an file lock must be used to claim the right for listening on respective file. | ||
//https://gavv.github.io/blog/unix-socket-reuse/ | ||
if isUnixDomainSocketFileSystemBased(ls.path) && !___DEBUG_IGNORE_FLOCK { | ||
ls.lockfile, err = acquireLock(ls.path + ".lock") | ||
if err != nil { | ||
|
@@ -136,6 +138,7 @@ func (ls *Listener) uploop(cctx context.Context) { | |
|
||
if err != nil { | ||
newError("Cannot Accept socket from listener").Base(err).AtDebug().WriteToLog() | ||
//Guard against too many open file error | ||
if err == lasterror { | ||
errortolerance-- | ||
if errortolerance == 0 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guard against too many open file error There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please put this comment into source code. |
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the unix domain socket is filesystem based, an file lock must be used to claim the right for listening on respective file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gavv.github.io/blog/unix-socket-reuse/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put this comment into source code.