-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add DomainStrategy to JSONv5 outbound #2550
Conversation
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.
#2334 Adds DomainStrategy
for outbound's SenderSettings
, which coexists with freedom's Config
in JsonV4. Now both is absent in JsonV5.
Do you think in this PR we should add both config for JsonV5 for compatibility, or just add to outbound's SenderSettings
to advocate the usage of newer generic one?
Edit: 40d75fa actually lacks a whole bunch of freedom outbound config in JSONv4:
v4:
v2ray-core/proxy/freedom/config.proto
Lines 16 to 27 in 2ac0188
message Config { | |
enum DomainStrategy { | |
AS_IS = 0; | |
USE_IP = 1; | |
USE_IP4 = 2; | |
USE_IP6 = 3; | |
} | |
DomainStrategy domain_strategy = 1; | |
uint32 timeout = 2 [deprecated = true]; | |
DestinationOverride destination_override = 3; | |
uint32 user_level = 4; | |
} |
v5:
v2ray-core/proxy/freedom/config.proto
Lines 29 to 32 in 2ac0188
message SimplifiedConfig { | |
option (v2ray.core.common.protoext.message_opt).type = "outbound"; | |
option (v2ray.core.common.protoext.message_opt).short_name = "freedom"; | |
} |
So bringing freedom's config back may be done in a separated PR.
@Vigilans The new configuration format already brought us lot of breaking change, so I'm fine with the new unified one without the compatible design. |
I think it's better to throw an exception when |
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 merge request can be merged in principle, however, some modification will be needed to make sure there is only one recognized value for each options and throws explicit errors otherwise.
I will merge and make modification myself. |
Added
domainStrategy
field foroutbound
in JSONv5 configuration file. This feature was introduced in #2334 and is only available in the JSONv4 configuration format.This pull request:
Credits:
Usage:
I was not able to create single commit by using web editor, please consider using squash when merging this pull request.