2021-03-07 06:39:50 +02:00
|
|
|
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
|
|
|
|
}
|
2021-03-14 17:58:27 +02:00
|
|
|
|
2022-05-18 10:29:01 +03:00
|
|
|
var (
|
|
|
|
FakeIPv4Pool = "198.18.0.0/15"
|
|
|
|
FakeIPv6Pool = "fc00::/18"
|
|
|
|
)
|
2021-10-20 08:15:49 +03:00
|
|
|
|
|
|
|
type FakeDNSEngineRev0 interface {
|
|
|
|
FakeDNSEngine
|
|
|
|
IsIPInIPPool(ip net.Address) bool
|
|
|
|
GetFakeIPForDomain3(domain string, IPv4, IPv6 bool) []net.Address
|
|
|
|
}
|