Skip to content

Commit 591ffbb

Browse files
committed
Bugfix in socks configuration
1 parent 132d9f7 commit 591ffbb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/client/udp-tracker.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ UDPTracker.prototype._request = function (opts) {
7171
var socket
7272
var transactionId = genTransactionId()
7373
if (self.client._socksProxyOpts) {
74+
if (!self.client._socksProxyOpts.proxy) {
75+
self.client._socksProxyOpts.proxy = {}
76+
}
7477
// UDP requests uses the associate command
75-
self.client._socksProxyOpts.command = 'associate'
78+
self.client._socksProxyOpts.proxy.command = 'associate'
7679
if (!self.client._socksProxyOpts.target) {
7780
// This should contain client IP and port but can be set to 0 if we don't have this information
7881
self.client._socksProxyOpts.target = {

0 commit comments

Comments
 (0)