fakedns.go 472 B

1234567891011121314151617181920212223
  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 (
  12. FakeIPv4Pool = "198.18.0.0/15"
  13. FakeIPv6Pool = "fc00::/18"
  14. )
  15. type FakeDNSEngineRev0 interface {
  16. FakeDNSEngine
  17. IsIPInIPPool(ip net.Address) bool
  18. GetFakeIPForDomain3(domain string, IPv4, IPv6 bool) []net.Address
  19. }