mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 17:51:16 +08:00
17 lines
284 B
Go
17 lines
284 B
Go
package fakedns
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
type FakeDNS interface {
|
|
Start() error
|
|
Stop() error
|
|
|
|
// Resolve a fake dns response for the specify request.
|
|
Resolve([]byte) ([]byte, error)
|
|
|
|
// IPToHost returns the corresponding domain for the given IP.
|
|
IPToHost(ip net.IP) (string, bool)
|
|
}
|