-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Apply DomainStrategy to outbound target #2553
Apply DomainStrategy to outbound target #2553
Conversation
73b9ed1
to
c9d3fd3
Compare
A question raised is that do we need to make these two behaviors individually configurable? E.g., we may need to resolve proxy server's address using own strategy in v2ray's DNS, but still delegate target domain to remote server for resolution. If individually configurable, how to specify the config format? Option 1:
Option 2
|
Codecov ReportPatch and project coverage have no change.
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #2553 +/- ##
=======================================
Coverage 38.31% 38.31%
=======================================
Files 637 637
Lines 38110 38118 +8
=======================================
+ Hits 14601 14606 +5
- Misses 21901 21904 +3
Partials 1608 1608
☔ View full report in Codecov by Sentry. |
If
SagerNet has done roughly the same thing as this PR before and named it |
The previous behavior is SagerNet@4f039c0 's So we enumerate the usage possibilities: 1. Single stack proxy server + AsIs
2. Single stack proxy server + UseIPv4/UseIPv6
3. Single stack proxy server + UseIP
4. Dual stack proxy server + AsIs
5. Dual stack proxy server + UseIPv4/UseIPv6
6. Dual stack proxy server + UseIP
Case 3 is meaningless since Case 1 and Case 2 covers all scenarios for single-stack server. For proxy server, Case 5 can be implemented as Case 6 with DNS On the other hand, with SagerNet@4f039c0 's
Therefore |
c9d3fd3
to
2ac0188
Compare
It has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days |
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.
I think this pull request is ready to be merged. Thanks for your contribution. It will be included in v5.12.0.
This reverts commit ce7dc23. Until implementation of `PreferIPv4` and `PreferIPv6`. See v2fly#2553
Fixes #2448 (comment)
For outbounds like SOCKS5, VMESS,
domainStrategy
will only take effect on proxy server's address (becausedomainStrategy
only applies for dialing).This PR applies
domainStrategy
to outbound handler'sDispatch
method, so all outbound targets will be affected bydomainStrategy
. ThereforedomainStrategy
for SOCKS5 and VMESS will behave like Freedom outbound.Prior behavior for SOCKS5, VMESS:
domainStrategy
.domainStrategy
.After this PR
domainStrategy
.domainStrategy
.