mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-04 04:17:36 +03:00
Add resolver for outbound dialer
This commit is contained in:
parent
ecac383477
commit
538a1f5909
32 changed files with 1058 additions and 222 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue