Xray-core/features/dns/fakedns.go
yuhan6665 6b6974c804
Fakedns improvements (#731)
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: sixg0000d <sixg0000d@gmail.com>
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-10-20 13:15:49 +08:00

22 lines
470 B
Go

package dns
import (
"github.com/xtls/xray-core/common/net"
"github.com/xtls/xray-core/features"
)
type FakeDNSEngine interface {
features.Feature
GetFakeIPForDomain(domain string) []net.Address
GetDomainFromFakeDNS(ip net.Address) string
}
var FakeIPv4Pool = "198.18.0.0/15"
var FakeIPv6Pool = "fc00::/18"
type FakeDNSEngineRev0 interface {
FakeDNSEngine
IsIPInIPPool(ip net.Address) bool
GetFakeIPForDomain3(domain string, IPv4, IPv6 bool) []net.Address
}