mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-09-28 09:58:06 +03:00
https://github.com/XTLS/Xray-core/discussions/5458#discussioncomment-18555021 https://github.com/XTLS/Xray-core/pull/6815#issuecomment-5842712128
24 lines
474 B
Go
24 lines
474 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"
|
|
FakeIPv6Pool = "2001:2::/48"
|
|
)
|
|
|
|
type FakeDNSEngineRev0 interface {
|
|
FakeDNSEngine
|
|
IsIPInIPPool(ip net.Address) bool
|
|
GetFakeIPForDomain3(domain string, IPv4, IPv6 bool) []net.Address
|
|
}
|