diff --git a/src/go.mod b/src/go.mod index b5045a6..ac2652f 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,6 +1,6 @@ module github.com/sunbk201/ua3f -go 1.21.3 +go 1.19 require ( github.com/dlclark/regexp2 v1.11.4 diff --git a/src/main.go b/src/main.go index 29a036e..9d6b715 100644 --- a/src/main.go +++ b/src/main.go @@ -388,6 +388,13 @@ func Socks5Forward(client, target net.Conn, destAddrPort string) { } } +func min(a, b int) int { + if a < b { + return a + } + return b +} + func CopyPileline(dst io.Writer, src io.Reader, destAddrPort string) { buf := make([]byte, RDBUF) nr, err := src.Read(buf)