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

Conversation

xiaokangwang
Copy link
Contributor

Currently, only basic support for stream unix domain socket is included.

Works:

Dial & Listen for stream unix domain socket.

Won't work:

  • Dial/Listen non-stream unix domain socket
  • Security for domain socket

@xiaokangwang xiaokangwang self-assigned this Apr 5, 2018
@xiaokangwang
Copy link
Contributor Author

I might have pulled from 2b67533 which have test failures. If this is the reason for test fail in this pr, I can add anther merge command to resolve this issue given the issue on master have resolved.

newError("Cannot Accept socket from listener").Base(err).AtDebug().WriteToLog()
if err == lasterror {
errortolerance--
if errortolerance == 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guard against too many open file error

Copy link
Contributor

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.

return err
}

if isUnixDomainSocketFileSystemBased(ls.path) && !___DEBUG_IGNORE_FLOCK {
Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

@DarienRaymond DarienRaymond merged commit 61d9b04 into master Apr 9, 2018
@DarienRaymond DarienRaymond deleted the domainsocket branch April 9, 2018 10:42
xiocode pushed a commit to going/v2ray-core that referenced this pull request Dec 28, 2021
* fix:observatory not supported by multi-json

* Fix: observatory starts with empty config & fails to close (v2ray#957)

* Update strategy_leastping.go (v2ray#1019)

* add custom probe URL support for observatory

* add custom probe interval for observer

* apply coding style

* Fix: observatory log & JSON config(v2ray#1211)

Co-authored-by: ihotte <[email protected]>

* Change default probe url from api.v2fly.org to www.google.com

* Cherry-pick missing code from branch 'dev-advloadblancer-2'

Co-authored-by: Shelikhoo <[email protected]>
Co-authored-by: Loyalsoldier <[email protected]>
Co-authored-by: fanyiguan <[email protected]>
Co-authored-by: ihotte <[email protected]>
Co-authored-by: ihotte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants