From 26d2cf4af6f14619c1189295ea7e3003240a8c92 Mon Sep 17 00:00:00 2001 From: amir gh Date: Fri, 20 Sep 2024 02:18:34 +0100 Subject: [PATCH] possible udp issue fix --- x/examples/soax-relay/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x/examples/soax-relay/main.go b/x/examples/soax-relay/main.go index 1fe9ebce..b1a14887 100644 --- a/x/examples/soax-relay/main.go +++ b/x/examples/soax-relay/main.go @@ -23,6 +23,7 @@ import ( "net" "net/netip" "strings" + "time" "github.com/Jigsaw-Code/outline-sdk/transport" csocks5 "github.com/Jigsaw-Code/outline-sdk/transport/socks5" @@ -128,6 +129,8 @@ func udpAssociateHandler(ctx context.Context, writer io.Writer, request *socks5. // close the upstream TCP connection as well. go func() { _, _ = io.Copy(io.Discard, request.Reader) + // let's see if this fixes the udp issue on remote server + time.Sleep(5 * time.Second) conn.Close() }()