fix: downgrade Go version to 1.19 and add min function for comparison

This commit is contained in:
sunbk201 2024-11-09 10:47:06 +08:00
parent 1ce1d4a401
commit 3ce2e11817
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,6 @@
module github.com/sunbk201/ua3f
go 1.21.3
go 1.19
require (
github.com/dlclark/regexp2 v1.11.4

View File

@ -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)