Skip to content

Commit

Permalink
https://github.com/XTLS/Xray-core/issues/3556#issuecomment-2238805008
Browse files Browse the repository at this point in the history
  • Loading branch information
YUNRU committed Jul 19, 2024
1 parent 87fd93d commit 6e416ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions transport/internet/splithttp/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,13 @@ func ListenSH(ctx context.Context, address net.Address, port net.Port, streamSet
}
errors.LogInfo(ctx, "listening unix domain socket(for SH) on ", address)
} else if l.isH3 { // quic
Conn, err := net.ListenUDP("udp", &net.UDPAddr{
Conn, err := internet.ListenSystemPacket(context.Background(), &net.UDPAddr{
IP: address.IP(),
Port: int(port),
})
}, streamSettings.SocketSettings)
if err != nil {
return nil, errors.New("failed to listen UDP(for SH3) on ", address, ":", port).Base(err)
}
h3listener, err := quic.ListenEarly(Conn,tlsConfig, nil)
if err != nil {
return nil, errors.New("failed to listen QUIC(for SH3) on ", address, ":", port).Base(err)
Expand Down

0 comments on commit 6e416ab

Please sign in to comment.