Browse Source

remove nil check

pull/15/head
Jason 5 years ago
parent
commit
0d1bdd7f0d
  1. 2
      component/fakedns/middleware.go
  2. 3
      proxy/proxy.go

2
component/fakedns/middleware.go

@ -11,7 +11,7 @@ import (
)
var (
BackendDNS = []string{}
BackendDNS []string
)
func dnsExchange(r *D.Msg) (msg *D.Msg) {

3
proxy/proxy.go

@ -43,9 +43,6 @@ func RegisterFakeDNS(d D.FakeDNS, h string) {
// Check target if is hijacked address.
func isHijacked(target *net.UDPAddr) bool {
if hijackDNS == nil || len(hijackDNS) == 0 {
return false
}
for _, addr := range hijackDNS {
host, port, err := net.SplitHostPort(addr)
if err != nil {

Loading…
Cancel
Save