Add resolver for outbound dialer

This commit is contained in:
世界 2022-07-07 21:47:21 +08:00
parent ecac383477
commit 538a1f5909
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
32 changed files with 1058 additions and 222 deletions

View file

@ -97,7 +97,8 @@ func (s DomainStrategy) MarshalJSON() ([]byte, error) {
var value string
switch C.DomainStrategy(s) {
case C.DomainStrategyAsIS:
value = "AsIS"
value = ""
// value = "AsIS"
case C.DomainStrategyPreferIPv4:
value = "PreferIPv4"
case C.DomainStrategyPreferIPv6:
@ -119,7 +120,7 @@ func (s *DomainStrategy) UnmarshalJSON(bytes []byte) error {
return err
}
switch value {
case "AsIS":
case "", "AsIS":
*s = DomainStrategy(C.DomainStrategyAsIS)
case "PreferIPv4":
*s = DomainStrategy(C.DomainStrategyPreferIPv4)