mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
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>
This commit is contained in:
parent
e286cdcaa8
commit
6b6974c804
12 changed files with 478 additions and 59 deletions
|
@ -1,8 +1,6 @@
|
|||
package dns
|
||||
|
||||
import (
|
||||
gonet "net"
|
||||
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/features"
|
||||
)
|
||||
|
@ -11,7 +9,13 @@ type FakeDNSEngine interface {
|
|||
features.Feature
|
||||
GetFakeIPForDomain(domain string) []net.Address
|
||||
GetDomainFromFakeDNS(ip net.Address) string
|
||||
GetFakeIPRange() *gonet.IPNet
|
||||
}
|
||||
|
||||
var FakeIPPool = "198.18.0.0/16"
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue