mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 08:44:29 +00:00
fix: downgrade Go version to 1.19 and add min function for comparison
This commit is contained in:
parent
f019f4639d
commit
4595692708
@ -1,6 +1,6 @@
|
||||
module github.com/sunbk201/ua3f
|
||||
|
||||
go 1.21.3
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/dlclark/regexp2 v1.11.4
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user