socks-handler
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,2 +0,2 @@ | ||
var name, socks4, socks5, value, _ref, _ref1; | ||
var socks4, socks5; | ||
@@ -18,3 +18,5 @@ socks4 = require('./socks4'); | ||
default: | ||
callback(new Error("Unsupported SOCKS version: " + version)); | ||
if (typeof callback === "function") { | ||
callback(new Error("Unsupported SOCKS version: " + version)); | ||
} | ||
return; | ||
@@ -27,26 +29,10 @@ } | ||
}); | ||
return typeof callback === "function" ? callback(null, handler) : void 0; | ||
return handler.on('error', function(err) { | ||
return typeof callback === "function" ? callback(err) : void 0; | ||
}); | ||
}); | ||
}; | ||
exports.COMMAND = socks5.COMMAND; | ||
exports[4] = socks4; | ||
exports.AUTH_METHOD = socks5.AUTH_METHOD; | ||
exports.AUTH_STATUS = socks5.AUTH_STATUS; | ||
exports.ADDRTYPE = socks5.ADDRTYPE; | ||
exports.REQUEST_STATUS = {}; | ||
_ref = socks4.REQUEST_STATUS; | ||
for (name in _ref) { | ||
value = _ref[name]; | ||
exports.REQUEST_STATUS[name] = value; | ||
} | ||
_ref1 = socks5.REQUEST_STATUS; | ||
for (name in _ref1) { | ||
value = _ref1[name]; | ||
exports.REQUEST_STATUS[name] = value; | ||
} | ||
exports[5] = socks5; |
@@ -5,3 +5,3 @@ { | ||
"author": "Alexandre Kirszenberg <a.kirszenberg@gmail.com>", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"keywords": [ | ||
@@ -23,3 +23,3 @@ "socks", | ||
"scripts": { | ||
"pre-publish": "grunt" | ||
"prepublish": "grunt" | ||
}, | ||
@@ -26,0 +26,0 @@ |
14164
419