diff --git a/README.md b/README.md index da789f2a..f2dbf722 100644 --- a/README.md +++ b/README.md @@ -57,4 +57,3 @@ This software is released under the GPL-3.0 license. - [x] Redir proxy - [x] UDP support - [x] Connection manager -- [ ] ~~Event API~~ diff --git a/component/gun/gun.go b/component/gun/gun.go index 0da84a0d..d1eef3b8 100644 --- a/component/gun/gun.go +++ b/component/gun/gun.go @@ -167,7 +167,7 @@ func NewHTTP2Client(dialFn DialFn, tlsConfig *tls.Config) *http2.Transport { state := cn.ConnectionState() if p := state.NegotiatedProtocol; p != http2.NextProtoTLS { cn.Close() - return nil, errors.New("http2: unexpected ALPN protocol " + p + "; want q" + http2.NextProtoTLS) + return nil, fmt.Errorf("http2: unexpected ALPN protocol %s, want %s", p, http2.NextProtoTLS) } return cn, nil } diff --git a/proxy/redir/udp.go b/proxy/redir/udp.go index 74b47570..45a726e0 100644 --- a/proxy/redir/udp.go +++ b/proxy/redir/udp.go @@ -75,5 +75,5 @@ func handleRedirUDP(pc net.PacketConn, buf []byte, lAddr *net.UDPAddr, rAddr *ne lAddr: lAddr, buf: buf, } - tunnel.AddPacket(adapters.NewPacket(target, pkt, C.REDIR)) + tunnel.AddPacket(adapters.NewPacket(target, pkt, C.TPROXY)) } diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 316e3f4c..77c24d88 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -335,7 +335,7 @@ func match(metadata *C.Metadata) (C.Proxy, C.Rule, error) { } if metadata.NetWork == C.UDP && !adapter.SupportUDP() { - log.Debugln("%v UDP is not supported", adapter.Name()) + log.Debugln("%s UDP is not supported", adapter.Name()) continue } return adapter, rule, nil