mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
feat: Add DNS outbound to hijack DNS packets (#1078)
This commit is contained in:
@@ -120,6 +120,13 @@ func ParseProxy(mapping map[string]any) (C.Proxy, error) {
|
||||
break
|
||||
}
|
||||
proxy = outbound.NewDirectWithOption(*directOption)
|
||||
case "dns":
|
||||
dnsOptions := &outbound.DnsOption{}
|
||||
err = decoder.Decode(mapping, dnsOptions)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
proxy = outbound.NewDnsWithOption(*dnsOptions)
|
||||
case "reject":
|
||||
rejectOption := &outbound.RejectOption{}
|
||||
err = decoder.Decode(mapping, rejectOption)
|
||||
|
||||
Reference in New Issue
Block a user