Skip to content

Commit 361853c

Browse files
committed
Check socks version for UDP proxy
1 parent d3a7f9e commit 361853c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/client/udp-tracker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ UDPTracker.prototype._request = function (opts) {
9191
}
9292
}
9393

94-
Socks.createConnection(proxyOpts, onGotConnection)
94+
if (proxyOpts.proxy.type === 5) {
95+
Socks.createConnection(proxyOpts, onGotConnection)
96+
} else {
97+
debug('Ignoring Socks proxy for UDP request because type 5 is required')
98+
onGotConnection(null)
99+
}
95100
} else {
96101
onGotConnection(null)
97102
}

0 commit comments

Comments
 (0)