mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
dohdns.go: multiple typo fixes
This commit is contained in:
parent
90af5f19ba
commit
bde766770d
@ -27,9 +27,9 @@ import (
|
||||
"v2ray.com/core/transport/internet"
|
||||
)
|
||||
|
||||
// DoHNameServer implimented DNS over HTTPS (RFC8484) Wire Format,
|
||||
// which is compatiable with traditional dns over udp(RFC1035),
|
||||
// thus most of the DOH implimentation is copied from udpns.go
|
||||
// DoHNameServer implemented DNS over HTTPS (RFC8484) Wire Format,
|
||||
// which is compatible with traditional dns over udp(RFC1035),
|
||||
// thus most of the DOH implementation is copied from udpns.go
|
||||
type DoHNameServer struct {
|
||||
sync.RWMutex
|
||||
ips map[string]record
|
||||
@ -48,11 +48,11 @@ func NewDoHNameServer(url *url.URL, dispatcher routing.Dispatcher, clientIP net.
|
||||
newError("DNS: created Remote DOH client for ", url.String()).AtInfo().WriteToLog()
|
||||
s := baseDOHNameServer(url, "DOH", clientIP)
|
||||
|
||||
// Dispatched connection will be closed (interupted) after each request
|
||||
// This makes DOH inefficient without a keeped-alive connection
|
||||
// Dispatched connection will be closed (interrupted) after each request
|
||||
// This makes DOH inefficient without a keep-alived connection
|
||||
// See: core/app/proxyman/outbound/handler.go:113
|
||||
// Using mux (https request wrapped in a stream layer) improves the situation.
|
||||
// Recommand to use NewDoHLocalNameServer (DOHL:) if v2ray instance is running on
|
||||
// Recommend to use NewDoHLocalNameServer (DOHL:) if v2ray instance is running on
|
||||
// a normal network eg. the server side of v2ray
|
||||
tr := &http.Transport{
|
||||
MaxIdleConns: 30,
|
||||
@ -191,7 +191,7 @@ func (s *DoHNameServer) updateIP(req *dnsRequest, ipRec *IPRecord) {
|
||||
updated = true
|
||||
}
|
||||
}
|
||||
newError(s.name, " got answere: ", req.domain, " ", req.reqType, " -> ", ipRec.IP, " ", elapsed).AtInfo().WriteToLog()
|
||||
newError(s.name, " got answer: ", req.domain, " ", req.reqType, " -> ", ipRec.IP, " ", elapsed).AtInfo().WriteToLog()
|
||||
|
||||
if updated {
|
||||
s.ips[req.domain] = rec
|
||||
|
Loading…
Reference in New Issue
Block a user