fakedns.go 470 B

123456789101112131415161718192021
  1. package dns
  2. import (
  3. "github.com/xtls/xray-core/common/net"
  4. "github.com/xtls/xray-core/features"
  5. )
  6. type FakeDNSEngine interface {
  7. features.Feature
  8. GetFakeIPForDomain(domain string) []net.Address
  9. GetDomainFromFakeDNS(ip net.Address) string
  10. }
  11. var FakeIPv4Pool = "198.18.0.0/15"
  12. var FakeIPv6Pool = "fc00::/18"
  13. type FakeDNSEngineRev0 interface {
  14. FakeDNSEngine
  15. IsIPInIPPool(ip net.Address) bool
  16. GetFakeIPForDomain3(domain string, IPv4, IPv6 bool) []net.Address
  17. }