proxy_chain_rb 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +16 -16
- data/README.md +14 -5
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/.yarn-integrity +23 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/README.md +1 -1
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.core.js +254 -121
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.core.min.js +3 -3
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.js +284 -129
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.min.js +4 -4
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/async.js +3 -48
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/debuggability.js +145 -27
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/join.js +4 -7
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/map.js +10 -3
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/promise.js +58 -28
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/promise_array.js +1 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/reduce.js +16 -5
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/settle.js +4 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/js/release/util.js +39 -7
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/bluebird/package.json +39 -63
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/commander/CHANGELOG.md +11 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/commander/index.js +1 -1
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/commander/package.json +20 -52
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/debug/package.json +21 -60
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/ms/package.json +19 -51
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/portastic/node_modules/bluebird/package.json +41 -66
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/portastic/package.json +23 -51
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/CHANGELOG.md +18 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/README.md +8 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/anonymize_proxy.js +5 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/handler_base.js +86 -53
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/handler_forward.js +23 -5
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/handler_tunnel_chain.js +3 -7
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/handler_tunnel_direct.js +1 -1
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/index.js +3 -5
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/server.js +3 -1
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/tcp_tunnel.js +245 -115
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/tcp_tunnel_tools.js +138 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/node_modules/.bin/portastic +1 -0
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/package.json +41 -68
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/underscore/package.json +27 -58
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/package.json +1 -1
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/server.js +4 -2
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/yarn.lock +53 -0
- data/lib/proxy_chain_rb/server.rb +8 -6
- data/lib/proxy_chain_rb/version.rb +1 -1
- data/proxy_chain_rb.gemspec +3 -3
- metadata +16 -14
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/node_modules/proxy-chain/build/handler_tunnel_tcp_chain.js +0 -271
- data/lib/proxy_chain_rb/node_js/proxy-chain-server/package-lock.json +0 -63
@@ -0,0 +1,138 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
8
|
+
|
9
|
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
10
|
+
|
11
|
+
exports.createTunnel = createTunnel;
|
12
|
+
exports.closeTunnel = closeTunnel;
|
13
|
+
|
14
|
+
var _bluebird = require('bluebird');
|
15
|
+
|
16
|
+
var _bluebird2 = _interopRequireDefault(_bluebird);
|
17
|
+
|
18
|
+
var _net = require('net');
|
19
|
+
|
20
|
+
var _net2 = _interopRequireDefault(_net);
|
21
|
+
|
22
|
+
var _tcp_tunnel = require('./tcp_tunnel');
|
23
|
+
|
24
|
+
var _tcp_tunnel2 = _interopRequireDefault(_tcp_tunnel);
|
25
|
+
|
26
|
+
var _tools = require('./tools');
|
27
|
+
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
29
|
+
|
30
|
+
var runningServers = {};
|
31
|
+
|
32
|
+
function createTunnel(proxyUrl, targetHost) {
|
33
|
+
var providedOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
34
|
+
var callback = arguments[3];
|
35
|
+
|
36
|
+
// TODO: More and better validations - yeah, make sure targetHost is really a hostname
|
37
|
+
var _targetHost$split = targetHost.split(':'),
|
38
|
+
_targetHost$split2 = _slicedToArray(_targetHost$split, 2),
|
39
|
+
trgHostname = _targetHost$split2[0],
|
40
|
+
trgPort = _targetHost$split2[1];
|
41
|
+
|
42
|
+
if (!trgHostname || !trgPort) throw new Error('target needs to include both hostname and port.');
|
43
|
+
|
44
|
+
var parsedProxyUrl = (0, _tools.parseUrl)(proxyUrl);
|
45
|
+
if (!parsedProxyUrl.hostname) throw new Error('proxyUrl needs to include atleast hostname');
|
46
|
+
if (parsedProxyUrl.scheme !== 'http') throw new Error('Currently only "http" scheme is supported');
|
47
|
+
|
48
|
+
var options = _extends({
|
49
|
+
verbose: false,
|
50
|
+
hostname: 'localhost',
|
51
|
+
port: null
|
52
|
+
}, providedOptions);
|
53
|
+
|
54
|
+
return new _bluebird2.default(function (resolve, reject) {
|
55
|
+
if (options.port) return resolve(options.port);
|
56
|
+
(0, _tools.findFreePort)().then(resolve).catch(reject);
|
57
|
+
}).then(function (port) {
|
58
|
+
var server = _net2.default.createServer();
|
59
|
+
|
60
|
+
var log = function log() {
|
61
|
+
var _console;
|
62
|
+
|
63
|
+
if (options.verbose) (_console = console).log.apply(_console, arguments);
|
64
|
+
};
|
65
|
+
|
66
|
+
server.on('connection', function (srcSocket) {
|
67
|
+
runningServers[port].connections = srcSocket;
|
68
|
+
var remoteAddress = srcSocket.remoteAddress + ':' + srcSocket.remotePort;
|
69
|
+
log('new client connection from %s', remoteAddress);
|
70
|
+
|
71
|
+
srcSocket.pause();
|
72
|
+
|
73
|
+
var tunnel = new _tcp_tunnel2.default({
|
74
|
+
srcSocket: srcSocket,
|
75
|
+
upstreamProxyUrlParsed: parsedProxyUrl,
|
76
|
+
trgParsed: {
|
77
|
+
hostname: trgHostname,
|
78
|
+
port: trgPort
|
79
|
+
},
|
80
|
+
log: log
|
81
|
+
});
|
82
|
+
|
83
|
+
tunnel.run();
|
84
|
+
|
85
|
+
srcSocket.on('data', onConnData);
|
86
|
+
srcSocket.once('close', onConnClose);
|
87
|
+
srcSocket.on('error', onConnError);
|
88
|
+
|
89
|
+
function onConnData(d) {
|
90
|
+
log('connection data from %s: %j', remoteAddress, d);
|
91
|
+
}
|
92
|
+
|
93
|
+
function onConnClose() {
|
94
|
+
log('connection from %s closed', remoteAddress);
|
95
|
+
}
|
96
|
+
|
97
|
+
function onConnError(err) {
|
98
|
+
log('Connection %s error: %s', remoteAddress, err.message);
|
99
|
+
}
|
100
|
+
});
|
101
|
+
|
102
|
+
return new _bluebird2.default(function (resolve) {
|
103
|
+
server.listen(port, function (err) {
|
104
|
+
if (err) return reject(err);
|
105
|
+
log('server listening to ', server.address());
|
106
|
+
runningServers[port] = { server: server, connections: [] };
|
107
|
+
resolve(options.hostname + ':' + port);
|
108
|
+
});
|
109
|
+
});
|
110
|
+
}).nodeify(callback);
|
111
|
+
}
|
112
|
+
|
113
|
+
function closeTunnel(serverPath, closeConnections, callback) {
|
114
|
+
var _serverPath$split = serverPath.split(':'),
|
115
|
+
_serverPath$split2 = _slicedToArray(_serverPath$split, 2),
|
116
|
+
hostname = _serverPath$split2[0],
|
117
|
+
port = _serverPath$split2[1];
|
118
|
+
|
119
|
+
if (!hostname) throw new Error('serverPath must contain hostname');
|
120
|
+
if (!port) throw new Error('serverPath must contain port');
|
121
|
+
|
122
|
+
return new _bluebird2.default(function (resolve) {
|
123
|
+
if (!runningServers[port]) return resolve(false);
|
124
|
+
if (!closeConnections) return resolve();
|
125
|
+
runningServers[port].connections.forEach(function (connection) {
|
126
|
+
return connection.destroy();
|
127
|
+
});
|
128
|
+
resolve();
|
129
|
+
}).then(function (serverExists) {
|
130
|
+
return new _bluebird2.default(function (resolve) {
|
131
|
+
if (!serverExists) return resolve(false);
|
132
|
+
runningServers[port].close(function () {
|
133
|
+
delete runningServers[port];
|
134
|
+
resolve(true);
|
135
|
+
});
|
136
|
+
});
|
137
|
+
}).nodeify(callback);
|
138
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
../../../portastic/bin/portastic
|
@@ -1,104 +1,77 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"
|
7
|
-
|
8
|
-
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"raw": "proxy-chain",
|
12
|
-
"name": "proxy-chain",
|
13
|
-
"escapedName": "proxy-chain",
|
14
|
-
"rawSpec": "",
|
15
|
-
"saveSpec": null,
|
16
|
-
"fetchSpec": "latest"
|
17
|
-
},
|
18
|
-
"_requiredBy": [
|
19
|
-
"#USER",
|
20
|
-
"/"
|
2
|
+
"name": "proxy-chain",
|
3
|
+
"version": "0.3.2",
|
4
|
+
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",
|
5
|
+
"main": "build/index.js",
|
6
|
+
"keywords": [
|
7
|
+
"proxy",
|
8
|
+
"squid",
|
9
|
+
"apify",
|
10
|
+
"tunnel"
|
21
11
|
],
|
22
|
-
"_resolved": "https://registry.npmjs.org/proxy-chain/-/proxy-chain-0.2.7.tgz",
|
23
|
-
"_shasum": "3c24d1a487e37838b0c9fe34317c276f3401e0ec",
|
24
|
-
"_spec": "proxy-chain",
|
25
|
-
"_where": "/Users/sebastianjohnsson/Programming/Javascript/proxy-chain-server",
|
26
12
|
"author": {
|
27
13
|
"name": "Apify",
|
28
14
|
"email": "support@apify.com",
|
29
15
|
"url": "https://www.apify.com"
|
30
16
|
},
|
17
|
+
"contributors": [
|
18
|
+
"Jan Curn <jan@apify.com>"
|
19
|
+
],
|
20
|
+
"license": "Apache-2.0",
|
21
|
+
"repository": {
|
22
|
+
"type": "git",
|
23
|
+
"url": "git+https://github.com/apifytech/proxy-chain"
|
24
|
+
},
|
31
25
|
"bugs": {
|
32
26
|
"url": "https://github.com/apifytech/proxy-chain/issues"
|
33
27
|
},
|
34
|
-
"
|
35
|
-
"
|
36
|
-
|
37
|
-
"name": "Jan Curn",
|
38
|
-
"email": "jan@apify.com"
|
39
|
-
}
|
28
|
+
"homepage": "https://blog.apify.com/how-to-make-headless-chrome-and-puppeteer-use-a-proxy-server-with-authentication-249a21a79212",
|
29
|
+
"files": [
|
30
|
+
"build"
|
40
31
|
],
|
32
|
+
"scripts": {
|
33
|
+
"build": "rm -rf ./build && babel src --out-dir build",
|
34
|
+
"local-proxy": "npm run build && node ./build/run_locally.js",
|
35
|
+
"test": "npm run build && mocha --exit --recursive",
|
36
|
+
"prepare": "npm run build",
|
37
|
+
"prepublishOnly": "(test $RUNNING_FROM_SCRIPT || (echo \"You must use publish.sh instead of 'npm publish' directly!\"; exit 1)) && npm test && npm run lint",
|
38
|
+
"clean": "rm -rf build",
|
39
|
+
"lint": "npm run build && eslint src",
|
40
|
+
"lint-fix": "npm run build && eslint src --fix"
|
41
|
+
},
|
41
42
|
"dependencies": {
|
42
43
|
"bluebird": "^3.5.1",
|
43
44
|
"portastic": "^1.0.1",
|
44
45
|
"underscore": "^1.9.1"
|
45
46
|
},
|
46
|
-
"deprecated": false,
|
47
|
-
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",
|
48
47
|
"devDependencies": {
|
49
48
|
"babel-cli": "^6.6.5",
|
50
49
|
"babel-core": "^6.1.21",
|
51
|
-
"babel-eslint": "^
|
50
|
+
"babel-eslint": "^10.0.3",
|
52
51
|
"babel-preset-es2015": "^6.1.18",
|
53
52
|
"babel-preset-stage-0": "^6.1.18",
|
54
53
|
"basic-auth": "^2.0.0",
|
55
54
|
"body-parser": "^1.18.2",
|
56
55
|
"chai": "^4.0.2",
|
57
|
-
"eslint": "^3.
|
58
|
-
"eslint-config-airbnb": "^
|
59
|
-
"eslint-config-airbnb-base": "^
|
56
|
+
"eslint": "^6.3.0",
|
57
|
+
"eslint-config-airbnb": "^18.0.1",
|
58
|
+
"eslint-config-airbnb-base": "^14.0.0",
|
60
59
|
"eslint-plugin-import": "^2.2.0",
|
61
|
-
"eslint-plugin-jsx-a11y": "^
|
62
|
-
"eslint-plugin-promise": "^
|
60
|
+
"eslint-plugin-jsx-a11y": "^6.2.3",
|
61
|
+
"eslint-plugin-promise": "^4.2.1",
|
63
62
|
"eslint-plugin-react": "^7.0.1",
|
64
63
|
"express": "^4.16.2",
|
64
|
+
"faye-websocket": "^0.11.3",
|
65
65
|
"https-proxy-agent": "^2.1.0",
|
66
66
|
"isparta": "^4.0.0",
|
67
|
-
"mocha": "^
|
67
|
+
"mocha": "^6.2.0",
|
68
68
|
"phantomjs-prebuilt": "^2.1.16",
|
69
69
|
"proxy": "^0.2.4",
|
70
70
|
"request": "^2.83.0",
|
71
|
-
"sinon": "^
|
71
|
+
"sinon": "^7.4.2",
|
72
72
|
"sinon-stub-promise": "^4.0.0",
|
73
73
|
"through": "^2.3.8",
|
74
|
-
"ws": "^
|
75
|
-
},
|
76
|
-
"files": [
|
77
|
-
"build"
|
78
|
-
],
|
79
|
-
"homepage": "https://blog.apify.com/how-to-make-headless-chrome-and-puppeteer-use-a-proxy-server-with-authentication-249a21a79212",
|
80
|
-
"keywords": [
|
81
|
-
"proxy",
|
82
|
-
"squid",
|
83
|
-
"apify",
|
84
|
-
"tunnel"
|
85
|
-
],
|
86
|
-
"license": "Apache-2.0",
|
87
|
-
"main": "build/index.js",
|
88
|
-
"name": "proxy-chain",
|
89
|
-
"optionalDependencies": {},
|
90
|
-
"repository": {
|
91
|
-
"type": "git",
|
92
|
-
"url": "git+https://github.com/apifytech/proxy-chain.git"
|
93
|
-
},
|
94
|
-
"scripts": {
|
95
|
-
"build": "rm -rf ./build && babel src --out-dir build",
|
96
|
-
"clean": "rm -rf build",
|
97
|
-
"lint": "npm run build && eslint src",
|
98
|
-
"local-proxy": "npm run build && node ./build/run_locally.js",
|
99
|
-
"prepare": "npm run build",
|
100
|
-
"prepublishOnly": "(test $RUNNING_FROM_SCRIPT || (echo \"You must use publish.sh instead of 'npm publish' directly!\"; exit 1)) && npm test && npm run lint",
|
101
|
-
"test": "npm run build && mocha --compilers js:babel-core/register --recursive"
|
74
|
+
"ws": "^7.1.2"
|
102
75
|
},
|
103
|
-
"
|
76
|
+
"optionalDependencies": {}
|
104
77
|
}
|
@@ -1,37 +1,21 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
"
|
4
|
-
"
|
5
|
-
"
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"raw": "underscore@^1.9.1",
|
12
|
-
"name": "underscore",
|
13
|
-
"escapedName": "underscore",
|
14
|
-
"rawSpec": "^1.9.1",
|
15
|
-
"saveSpec": null,
|
16
|
-
"fetchSpec": "^1.9.1"
|
17
|
-
},
|
18
|
-
"_requiredBy": [
|
19
|
-
"/proxy-chain"
|
2
|
+
"name": "underscore",
|
3
|
+
"description": "JavaScript's functional programming helper library.",
|
4
|
+
"homepage": "http://underscorejs.org",
|
5
|
+
"keywords": [
|
6
|
+
"util",
|
7
|
+
"functional",
|
8
|
+
"server",
|
9
|
+
"client",
|
10
|
+
"browser"
|
20
11
|
],
|
21
|
-
"
|
22
|
-
"
|
23
|
-
|
24
|
-
|
25
|
-
"author": {
|
26
|
-
"name": "Jeremy Ashkenas",
|
27
|
-
"email": "jeremy@documentcloud.org"
|
28
|
-
},
|
29
|
-
"bugs": {
|
30
|
-
"url": "https://github.com/jashkenas/underscore/issues"
|
12
|
+
"author": "Jeremy Ashkenas <jeremy@documentcloud.org>",
|
13
|
+
"repository": {
|
14
|
+
"type": "git",
|
15
|
+
"url": "git://github.com/jashkenas/underscore.git"
|
31
16
|
},
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"description": "JavaScript's functional programming helper library.",
|
17
|
+
"main": "underscore.js",
|
18
|
+
"version": "1.9.1",
|
35
19
|
"devDependencies": {
|
36
20
|
"coveralls": "^2.11.2",
|
37
21
|
"docco": "*",
|
@@ -41,41 +25,26 @@
|
|
41
25
|
"karma-qunit": "~2.0.1",
|
42
26
|
"nyc": "^2.1.3",
|
43
27
|
"pretty-bytes-cli": "^1.0.0",
|
44
|
-
"qunit": "^2.6.0",
|
45
28
|
"qunit-cli": "~0.2.0",
|
29
|
+
"qunit": "^2.6.0",
|
46
30
|
"uglify-js": "3.3.21"
|
47
31
|
},
|
48
|
-
"files": [
|
49
|
-
"underscore.js",
|
50
|
-
"underscore-min.js",
|
51
|
-
"underscore-min.js.map"
|
52
|
-
],
|
53
|
-
"homepage": "http://underscorejs.org",
|
54
|
-
"keywords": [
|
55
|
-
"util",
|
56
|
-
"functional",
|
57
|
-
"server",
|
58
|
-
"client",
|
59
|
-
"browser"
|
60
|
-
],
|
61
|
-
"license": "MIT",
|
62
|
-
"main": "underscore.js",
|
63
|
-
"name": "underscore",
|
64
|
-
"repository": {
|
65
|
-
"type": "git",
|
66
|
-
"url": "git://github.com/jashkenas/underscore.git"
|
67
|
-
},
|
68
32
|
"scripts": {
|
69
|
-
"
|
33
|
+
"test": "npm run lint && npm run test-node",
|
70
34
|
"coverage": "nyc npm run test-node && nyc report",
|
71
35
|
"coveralls": "nyc npm run test-node && nyc report --reporter=text-lcov | coveralls",
|
72
|
-
"doc": "docco underscore.js",
|
73
36
|
"lint": "eslint underscore.js test/*.js",
|
74
|
-
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
|
75
|
-
"test": "npm run lint && npm run test-node",
|
76
|
-
"test-browser": "npm i karma-phantomjs-launcher && karma start",
|
77
37
|
"test-node": "qunit-cli test/*.js",
|
38
|
+
"test-browser": "npm i karma-phantomjs-launcher && karma start",
|
39
|
+
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
|
40
|
+
"build": "npm run minify -- --source-map --source-map-url \" \" -o underscore-min.js",
|
41
|
+
"doc": "docco underscore.js",
|
78
42
|
"weight": "npm run minify | gzip-size | pretty-bytes"
|
79
43
|
},
|
80
|
-
"
|
44
|
+
"license": "MIT",
|
45
|
+
"files": [
|
46
|
+
"underscore.js",
|
47
|
+
"underscore-min.js",
|
48
|
+
"underscore-min.js.map"
|
49
|
+
]
|
81
50
|
}
|
@@ -2,13 +2,15 @@
|
|
2
2
|
|
3
3
|
'use strict'
|
4
4
|
|
5
|
-
if (process.argv.length !=
|
6
|
-
console.log("usage: node server.js proxy_url instance_id")
|
5
|
+
if (process.argv.length != 6) {
|
6
|
+
console.log("usage: node server.js proxy_url instance_id tag started")
|
7
7
|
process.exit(0)
|
8
8
|
}
|
9
9
|
|
10
10
|
const proxyUrl = process.argv[2].trim();
|
11
11
|
const instanceId = process.argv[3].trim();
|
12
|
+
const tag = process.argv[4].trim();
|
13
|
+
const started = process.argv[5].trim();
|
12
14
|
|
13
15
|
const proxyChain = require('proxy-chain');
|
14
16
|
let anonymizedProxyUrl = null;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
2
|
+
# yarn lockfile v1
|
3
|
+
|
4
|
+
|
5
|
+
bluebird@^2.9.34:
|
6
|
+
version "2.11.0"
|
7
|
+
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1"
|
8
|
+
integrity sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=
|
9
|
+
|
10
|
+
bluebird@^3.5.1:
|
11
|
+
version "3.7.0"
|
12
|
+
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.0.tgz#56a6a886e03f6ae577cffedeb524f8f2450293cf"
|
13
|
+
integrity sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg==
|
14
|
+
|
15
|
+
commander@^2.8.1:
|
16
|
+
version "2.20.3"
|
17
|
+
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
|
18
|
+
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
|
19
|
+
|
20
|
+
debug@^2.2.0:
|
21
|
+
version "2.6.9"
|
22
|
+
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
23
|
+
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
|
24
|
+
dependencies:
|
25
|
+
ms "2.0.0"
|
26
|
+
|
27
|
+
ms@2.0.0:
|
28
|
+
version "2.0.0"
|
29
|
+
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
30
|
+
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
31
|
+
|
32
|
+
portastic@^1.0.1:
|
33
|
+
version "1.0.1"
|
34
|
+
resolved "https://registry.yarnpkg.com/portastic/-/portastic-1.0.1.tgz#1c9805d43fae8f6a40cf0dbc7794091a2e9d0d2a"
|
35
|
+
integrity sha1-HJgF1D+uj2pAzw28d5QJGi6dDSo=
|
36
|
+
dependencies:
|
37
|
+
bluebird "^2.9.34"
|
38
|
+
commander "^2.8.1"
|
39
|
+
debug "^2.2.0"
|
40
|
+
|
41
|
+
proxy-chain@^0.3.2:
|
42
|
+
version "0.3.2"
|
43
|
+
resolved "https://registry.yarnpkg.com/proxy-chain/-/proxy-chain-0.3.2.tgz#974524e3a8e7e9b12d81a9b53bb169caa5a990f5"
|
44
|
+
integrity sha512-7I163Gc6yzM4Zx1fKStTAE6TOPG6zHYJ2zW23CDQgTd62xPDuKWRIYmfWtKWS/2Oq7Q4k5GVAgamikOwPIweCg==
|
45
|
+
dependencies:
|
46
|
+
bluebird "^3.5.1"
|
47
|
+
portastic "^1.0.1"
|
48
|
+
underscore "^1.9.1"
|
49
|
+
|
50
|
+
underscore@^1.9.1:
|
51
|
+
version "1.9.1"
|
52
|
+
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961"
|
53
|
+
integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==
|