Skip to content

Commit

Permalink
possible udp issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amircybersec committed Sep 20, 2024
1 parent 16702a5 commit 26d2cf4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/examples/soax-relay/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
}()

Expand Down

0 comments on commit 26d2cf4

Please sign in to comment.