Commit 8121e20c authored by ginuerzh's avatar ginuerzh

update func calls

parent ece79946
......@@ -20,7 +20,7 @@ import (
)
// Version is the gost version.
const Version = "2.10.1"
const Version = "2.10.1-dev"
// Debug is a flag that enables the debug log.
var Debug bool
......
......@@ -53,7 +53,8 @@ func (h *tcpRedirectHandler) Handle(c net.Conn) {
log.Logf("[red-tcp] %s -> %s", srcAddr, dstAddr)
cc, err := h.options.Chain.Dial(dstAddr.String(),
cc, err := h.options.Chain.DialContext(context.Background(),
"tcp", dstAddr.String(),
RetryChainOption(h.options.Retries),
TimeoutChainOption(h.options.Timeout),
)
......
......@@ -345,7 +345,7 @@ func (c *udpClientConn) WriteTo(b []byte, addr net.Addr) (int, error) {
}
func (c *udpClientConn) ReadFrom(b []byte) (n int, addr net.Addr, err error) {
n, err = c.Read(b)
n, err = c.UDPConn.Read(b)
addr = c.RemoteAddr()
return
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment