Skip to content

Commit 64c48ce

Browse files
committed
Make clientConn an io.Writer.
1 parent 09e471f commit 64c48ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/udp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ func (m *natmap) Add(clientAddr string, assoc *association) (*association, bool)
497497
var maxAddrLen int = len(socks.ParseAddr("[2001:db8::1]:12345"))
498498

499499
// relayTargetToClient copies from target to client until read timeout.
500-
func relayTargetToClient(targetConn net.PacketConn, clientConn net.Conn, cryptoKey *shadowsocks.EncryptionKey, m UDPAssociationMetrics, l *slog.Logger) {
500+
func relayTargetToClient(targetConn net.PacketConn, clientConn io.Writer, cryptoKey *shadowsocks.EncryptionKey, m UDPAssociationMetrics, l *slog.Logger) {
501501
defer targetConn.Close()
502502

503503
// pkt is used for in-place encryption of downstream UDP packets, with the layout

0 commit comments

Comments
 (0)