mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
Add Fake DNS support (#309)
Co-authored-by: Xiaokang Wang <xiaokangwang@outlook.com> Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Co-authored-by: kslr <kslrwang@gmail.com>
This commit is contained in:
parent
db32ce6fd9
commit
f50eff5ebb
43 changed files with 1351 additions and 301 deletions
15
features/dns/fakedns.go
Normal file
15
features/dns/fakedns.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package dns
|
||||
|
||||
import (
|
||||
gonet "net"
|
||||
|
||||
"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
|
||||
GetFakeIPRange() *gonet.IPNet
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue