Compare commits

...

3 Commits

Author SHA1 Message Date
Dingjun Fang b3bd7c3421
Merge pull request #1 from fangdingjun/dependabot/go_modules/github.com/pires/go-proxyproto-0.6.1
Bump github.com/pires/go-proxyproto from 0.6.0 to 0.6.1
2 years ago
dependabot[bot] c8aac178b8
Bump github.com/pires/go-proxyproto from 0.6.0 to 0.6.1
Bumps [github.com/pires/go-proxyproto](https://github.com/pires/go-proxyproto) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/pires/go-proxyproto/releases)
- [Commits](https://github.com/pires/go-proxyproto/compare/v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/pires/go-proxyproto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
dingjun f8a6b1bb0a add err check 2 years ago

@ -12,7 +12,7 @@ require (
require (
github.com/kr/pretty v0.3.0 // indirect
github.com/pires/go-proxyproto v0.6.0 // indirect
github.com/pires/go-proxyproto v0.6.1 // indirect
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect

@ -15,8 +15,9 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg=
github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4=
github.com/pires/go-proxyproto v0.6.0 h1:cLJUPnuQdiNf7P/wbeOKmM1khVdaMgTFDLj8h9ZrVYk=
github.com/pires/go-proxyproto v0.6.0/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY=
github.com/pires/go-proxyproto v0.6.1 h1:EBupykFmo22SDjv4fQVQd2J9NOoLPmyZA/15ldOGkPw=
github.com/pires/go-proxyproto v0.6.1/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=

@ -52,7 +52,9 @@ func (srv *server) handleHTTPReq(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("content-type", dnsMsgType)
d, _ := m.Pack()
w.Write(d)
if _, err := w.Write(d); err != nil {
log.Errorln(err)
}
}
func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {

@ -27,6 +27,9 @@ func (srv *server) handleTCP(c net.Conn) {
for _, a := range m.Answer {
log.Debugln("result", a.String())
}
conn.WriteMsg(m)
if err := conn.WriteMsg(m); err != nil {
log.Errorln(err)
break
}
}
}

@ -24,5 +24,7 @@ func (srv *server) handleUDP(buf []byte, addr net.Addr, conn *net.UDPConn) {
log.Debugln("result", a.String())
}
d, _ := m.Pack()
conn.WriteTo(d, addr)
if _, err := conn.WriteTo(d, addr); err != nil {
log.Errorln(err)
}
}

Loading…
Cancel
Save