forked from mirror/serenity
Add custom DNS servers
This commit is contained in:
parent
fe3c2b4bdf
commit
4f768e630d
@ -23,6 +23,7 @@ type _Template struct {
|
|||||||
RemoteResolve bool `json:"remote_resolve,omitempty"`
|
RemoteResolve bool `json:"remote_resolve,omitempty"`
|
||||||
|
|
||||||
// DNS
|
// DNS
|
||||||
|
Servers []option.DNSServerOptions `json:"servers,omitempty"`
|
||||||
DNS string `json:"dns,omitempty"`
|
DNS string `json:"dns,omitempty"`
|
||||||
DNSLocal string `json:"dns_local,omitempty"`
|
DNSLocal string `json:"dns_local,omitempty"`
|
||||||
EnableFakeIP bool `json:"enable_fakeip,omitempty"`
|
EnableFakeIP bool `json:"enable_fakeip,omitempty"`
|
||||||
|
@ -36,6 +36,7 @@ func (t *Template) renderDNS(metadata M.Metadata, options *option.Options) error
|
|||||||
domainStrategyLocal = 0
|
domainStrategyLocal = 0
|
||||||
}
|
}
|
||||||
options.DNS = &option.DNSOptions{
|
options.DNS = &option.DNSOptions{
|
||||||
|
Servers: t.Servers,
|
||||||
ReverseMapping: !t.DisableTrafficBypass && metadata.Platform != M.PlatformUnknown && !metadata.Platform.IsApple(),
|
ReverseMapping: !t.DisableTrafficBypass && metadata.Platform != M.PlatformUnknown && !metadata.Platform.IsApple(),
|
||||||
DNSClientOptions: option.DNSClientOptions{
|
DNSClientOptions: option.DNSClientOptions{
|
||||||
Strategy: domainStrategy,
|
Strategy: domainStrategy,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user