|
81 | 81 | throw new Error("illegal argument");
|
82 | 82 |
|
83 | 83 | case 9:
|
84 |
| - d.addPort({ |
| 84 | + g.addPort({ |
85 | 85 | port: t,
|
86 | 86 | password: n
|
87 | 87 | });
|
|
104 | 104 | throw new Error("illegal argument");
|
105 | 105 |
|
106 | 106 | case 2:
|
107 |
| - return e.next = 5, d.removePort(r); |
| 107 | + return e.next = 5, g.removePort(r); |
108 | 108 |
|
109 | 109 | case 5:
|
110 | 110 | case "end":
|
|
118 | 118 | return regeneratorRuntime.wrap(function(e) {
|
119 | 119 | for (;;) switch (e.prev = e.next) {
|
120 | 120 | case 0:
|
121 |
| - return r = d.getPorts(), e.abrupt("return", r); |
| 121 | + return r = g.getPorts(), e.abrupt("return", r); |
122 | 122 |
|
123 | 123 | case 2:
|
124 | 124 | case "end":
|
|
148 | 148 | });
|
149 | 149 | };
|
150 | 150 | }
|
151 |
| - var p = t(1), f = t(2), l = (t(0)("dao"), f.resolve(__dirname, "./ports.json")), d = { |
| 151 | + var p = t(1), f = t(2), l = (t(0)("dao"), f.resolve(__dirname, "./ports.json")), g = { |
152 | 152 | ports: [],
|
153 | 153 | getPorts: function() {
|
154 | 154 | return this.ports;
|
|
199 | 199 | });
|
200 | 200 | }
|
201 | 201 | };
|
202 |
| - d.initPortsFromFile(), e.exports.addPort = o, e.exports.removePort = i, e.exports.getAllPorts = u; |
| 202 | + g.initPortsFromFile(), e.exports.addPort = o, e.exports.removePort = i, e.exports.getAllPorts = u; |
203 | 203 | }, function(e, r) {
|
204 | 204 | e.exports = require("portastic");
|
205 | 205 | }, function(e, r) {
|
|
208 | 208 | e.exports = require("unix-dgram");
|
209 | 209 | }, function(e, r, t) {
|
210 | 210 | "use strict";
|
211 |
| - var n, s, a, o, i, u, c, p, f, l, d, g, m, w, h, b, x, v, k = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { |
| 211 | + var n, s, a, o, i, u, c, p, f, l, g, d, m, w, h, b, x, v, k = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { |
212 | 212 | return typeof e;
|
213 | 213 | } : function(e) {
|
214 | 214 | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
705 | 705 | }, e, this);
|
706 | 706 | })), function() {
|
707 | 707 | return l.apply(this, arguments);
|
708 |
| - }), A = (d = W(regeneratorRuntime.mark(function e() { |
| 708 | + }), A = (g = W(regeneratorRuntime.mark(function e() { |
709 | 709 | var r, t, n, s;
|
710 | 710 | return regeneratorRuntime.wrap(function(e) {
|
711 | 711 | for (;;) switch (e.prev = e.next) {
|
|
745 | 745 | }
|
746 | 746 | }, e, this);
|
747 | 747 | })), function() {
|
748 |
| - return d.apply(this, arguments); |
749 |
| - }), q = (g = W(regeneratorRuntime.mark(function e() { |
| 748 | + return g.apply(this, arguments); |
| 749 | + }), q = (d = W(regeneratorRuntime.mark(function e() { |
750 | 750 | var r, t, n, s, a;
|
751 | 751 | return regeneratorRuntime.wrap(function(e) {
|
752 | 752 | for (;;) switch (e.prev = e.next) {
|
|
779 | 779 | }
|
780 | 780 | }, e, this);
|
781 | 781 | })), function() {
|
782 |
| - return g.apply(this, arguments); |
| 782 | + return d.apply(this, arguments); |
783 | 783 | }), j = (m = W(regeneratorRuntime.mark(function e(r) {
|
784 | 784 | var t, n, s;
|
785 | 785 | return regeneratorRuntime.wrap(function(e) {
|
|
1102 | 1102 | },
|
1103 | 1103 | getCommandKeyword: function(e, r) {
|
1104 | 1104 | if ("libev" !== e && "python" !== e) throw new Error("illegal argument");
|
1105 |
| - if ("ping" !== r && "getAllPorts" !== r && "add" !== r && "remove" !== r) throw new Error("illegal argument"); |
| 1105 | + if ("ping" !== r && "getAllPorts" !== r && "getAllTraffic" !== r && "add" !== r && "remove" !== r) throw new Error("illegal argument"); |
1106 | 1106 | return this.commandKeywords[e][r];
|
1107 | 1107 | }
|
1108 | 1108 | };
|
|
1357 | 1357 | }, e, this, [ [ 0, 7 ] ]);
|
1358 | 1358 | })), function(e, r) {
|
1359 | 1359 | return o.apply(this, arguments);
|
1360 |
| - }), d = (i = m(regeneratorRuntime.mark(function e(r, t) { |
| 1360 | + }), g = (i = m(regeneratorRuntime.mark(function e(r, t) { |
1361 | 1361 | var n;
|
1362 | 1362 | return regeneratorRuntime.wrap(function(e) {
|
1363 | 1363 | for (;;) switch (e.prev = e.next) {
|
|
1394 | 1394 | }, e, this, [ [ 0, 7 ] ]);
|
1395 | 1395 | })), function(e, r) {
|
1396 | 1396 | return i.apply(this, arguments);
|
1397 |
| - }), g = (u = m(regeneratorRuntime.mark(function e(r, t) { |
| 1397 | + }), d = (u = m(regeneratorRuntime.mark(function e(r, t) { |
1398 | 1398 | var n;
|
1399 | 1399 | return regeneratorRuntime.wrap(function(e) {
|
1400 | 1400 | for (;;) switch (e.prev = e.next) {
|
|
1482 | 1482 | t(3);
|
1483 | 1483 | var w = t(10), h = t(5), b = t(4), x = (t(0)("controller"), process.env.LOGIN_PASSWORD), v = b.createHash("sha256").update(x + "W93Ciowi2398(@qi30vmbj02i@WWSoekwoiK").digest("hex");
|
1484 | 1484 | e.exports.login = c, e.exports.addPort = p, e.exports.getAllPorts = f, e.exports.getAllTraffic = l,
|
1485 |
| - e.exports.ping = d, e.exports.removePort = g; |
| 1485 | + e.exports.ping = g, e.exports.removePort = d; |
1486 | 1486 | }, function(e, r) {
|
1487 | 1487 | e.exports = require("passport-jwt");
|
1488 | 1488 | }, function(e, r) {
|
|
1502 | 1502 | }, function(e, r, t) {
|
1503 | 1503 | "use strict";
|
1504 | 1504 | t(19).config();
|
1505 |
| - var n = t(18), s = t(1), a = t(17), o = t(16), i = t(15), u = t(14), c = t(4), p = t(13), f = t(12), l = f.Strategy, d = f.ExtractJwt, g = process.env.LOGIN_PASSWORD, m = c.createHash("sha256").update(g + "W93Ciowi2398(@qi30vmbj02i@WWSoekwoiK").digest("hex"), w = void 0; |
| 1505 | + var n = t(18), s = t(1), a = t(17), o = t(16), i = t(15), u = t(14), c = t(4), p = t(13), f = t(12), l = f.Strategy, g = f.ExtractJwt, d = process.env.LOGIN_PASSWORD, m = c.createHash("sha256").update(d + "W93Ciowi2398(@qi30vmbj02i@WWSoekwoiK").digest("hex"), w = void 0; |
1506 | 1506 | Number(process.env.LISTEN_PORT) && Number(process.env.LISTEN_PORT) >= 1 && Number(process.env.LISTEN_PORT) <= 65535 ? w = process.env.LISTEN_PORT : (console.warn("LISTEN_PORT invalid. Using 4001."),
|
1507 | 1507 | w = 4001);
|
1508 | 1508 | var h = {
|
1509 |
| - jwtFromRequest: d.fromAuthHeaderAsBearerToken(), |
| 1509 | + jwtFromRequest: g.fromAuthHeaderAsBearerToken(), |
1510 | 1510 | secretOrKey: m
|
1511 | 1511 | };
|
1512 | 1512 | p.use(new l(h, function(e, r) {
|
|
0 commit comments