mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-08 02:00:43 +08:00
19 lines
403 B
Go
19 lines
403 B
Go
package dns
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
const CommonDnsPort = 53
|
|
|
|
type FakeDns interface {
|
|
// GenerateFakeResponse generates a fake dns response for the specify request.
|
|
// GenerateFakeResponse(request []byte) ([]byte, error)
|
|
|
|
// IPToHost returns the corresponding domain for the given IP.
|
|
IPToHost(ip net.IP) (string, bool)
|
|
|
|
// IsFakeIP checks if the given ip is a fake IP.
|
|
// IsFakeIP(ip net.IP) bool
|
|
}
|