diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..0bcd788 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,18 @@ +{ "node": true +, "browser": true +, "jquery": true +, "globals": { "angular": true, "Promise": true } + +, "indent": 2 +, "onevar": true +, "laxcomma": true +, "laxbreak": true +, "curly": true +, "nonbsp": true + +, "eqeqeq": true +, "immed": true +, "undef": true +, "unused": true +, "latedef": true +} \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..d306351 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "bracketSpacing": true, + "printWidth": 120, + "tabWidth": 4, + "trailingComma": "none", + "useTabs": false +} diff --git a/dump/admin.html b/dump/admin.html index 3f376e7..830b681 100755 --- a/dump/admin.html +++ b/dump/admin.html @@ -1,110 +1,124 @@ - -Websock VPN Instrumentation - - - -
-
VPN Instrumentation
-
-
-
Control Plane
-
- -
-
-
- - - - + + Websock VPN Instrumentation + + +
+
VPN Instrumentation
+
+
+
Control Plane
+
+
+ +
+
+ + + + +
-
-
+
-
-
-
- - - - +
+
+
+ + + + +
-
-
-
Data
-
-

{[{text}]}

+
+
Data
+
+

{[{text}]}

+
-
- + - - - - - + + + + + - - - \ No newline at end of file + $scope.append_log = function (txt) { + $scope.log_elements.push(txt); + }; + }); + + diff --git a/dump/client.html b/dump/client.html index cfbdc39..ed31ccc 100755 --- a/dump/client.html +++ b/dump/client.html @@ -1,132 +1,151 @@ - -Websock VPN Test Client - - + + Websock VPN Test Client + + +
+
WebSocket Client Test
+
+
+
Control Plane
+
+
+ +
+
+ + + + +
+
+
-
-
WebSocket Client Test
-
-
-
Control Plane
-
+
-
-
-
- - - - +
+
+
+ + + + +
+
+
+ +
+ +
+
+
+ + + + +
- -
- -
-
-
- - - - -
-
-
- -
- -
-
-
- - - - -
-
-
- -
-
-
-
Messages
-
-

{[{text}]}

+
+
Messages
+
+

{[{text}]}

+
-
- + - - - - - + + + + + - + $scope.send_click = function () { + console.log("send_click"); + $scope.conn.send($scope.send_data); + }; + $scope.append_log = function (txt) { + $scope.log_elements.push(txt); + }; + }); + diff --git a/html/admin/404.html b/html/admin/404.html index 8d7925a..e653821 100644 --- a/html/admin/404.html +++ b/html/admin/404.html @@ -1,60 +1,57 @@ - + - - - Page Not Found - - - - -

Page Not Found

-

Sorry, but the page you were trying to view does not exist.

- + @media only screen and (max-width: 280px) { + body, + p { + width: 95%; + } + + h1 { + font-size: 1.5em; + margin: 0 0 0.3em; + } + } + + + +

Page Not Found

+

Sorry, but the page you were trying to view does not exist.

+ diff --git a/html/admin/css/main.css b/html/admin/css/main.css index ebd0ebd..0f0b3d5 100644 --- a/html/admin/css/main.css +++ b/html/admin/css/main.css @@ -95,22 +95,6 @@ textarea { Author's custom styles ========================================================================== */ - - - - - - - - - - - - - - - - /* ========================================================================== Helper classes ========================================================================== */ @@ -195,10 +179,7 @@ textarea { /* Style adjustments for viewports that meet the condition */ } -@media print, - (-webkit-min-device-pixel-ratio: 1.25), - (min-resolution: 1.25dppx), - (min-resolution: 120dpi) { +@media print, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 1.25dppx), (min-resolution: 120dpi) { /* Style adjustments for high resolution devices */ } diff --git a/html/admin/css/normalize.css b/html/admin/css/normalize.css index 5e5e3c8..e17a5da 100644 --- a/html/admin/css/normalize.css +++ b/html/admin/css/normalize.css @@ -7,9 +7,9 @@ */ html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ } /** @@ -17,7 +17,7 @@ html { */ body { - margin: 0; + margin: 0; } /* HTML5 display definitions @@ -43,7 +43,7 @@ menu, nav, section, summary { - display: block; + display: block; } /** @@ -55,8 +55,8 @@ audio, canvas, progress, video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ } /** @@ -65,8 +65,8 @@ video { */ audio:not([controls]) { - display: none; - height: 0; + display: none; + height: 0; } /** @@ -76,7 +76,7 @@ audio:not([controls]) { [hidden], template { - display: none; + display: none; } /* Links @@ -87,7 +87,7 @@ template { */ a { - background-color: transparent; + background-color: transparent; } /** @@ -97,7 +97,7 @@ a { a:active, a:hover { - outline: 0; + outline: 0; } /* Text-level semantics @@ -108,7 +108,7 @@ a:hover { */ abbr[title] { - border-bottom: 1px dotted; + border-bottom: 1px dotted; } /** @@ -117,7 +117,7 @@ abbr[title] { b, strong { - font-weight: bold; + font-weight: bold; } /** @@ -125,7 +125,7 @@ strong { */ dfn { - font-style: italic; + font-style: italic; } /** @@ -134,8 +134,8 @@ dfn { */ h1 { - font-size: 2em; - margin: 0.67em 0; + font-size: 2em; + margin: 0.67em 0; } /** @@ -143,8 +143,8 @@ h1 { */ mark { - background: #ff0; - color: #000; + background: #ff0; + color: #000; } /** @@ -152,7 +152,7 @@ mark { */ small { - font-size: 80%; + font-size: 80%; } /** @@ -161,18 +161,18 @@ small { sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sup { - top: -0.5em; + top: -0.5em; } sub { - bottom: -0.25em; + bottom: -0.25em; } /* Embedded content @@ -183,7 +183,7 @@ sub { */ img { - border: 0; + border: 0; } /** @@ -191,7 +191,7 @@ img { */ svg:not(:root) { - overflow: hidden; + overflow: hidden; } /* Grouping content @@ -202,7 +202,7 @@ svg:not(:root) { */ figure { - margin: 1em 40px; + margin: 1em 40px; } /** @@ -210,8 +210,8 @@ figure { */ hr { - box-sizing: content-box; - height: 0; + box-sizing: content-box; + height: 0; } /** @@ -219,7 +219,7 @@ hr { */ pre { - overflow: auto; + overflow: auto; } /** @@ -230,8 +230,8 @@ code, kbd, pre, samp { - font-family: monospace, monospace; - font-size: 1em; + font-family: monospace, monospace; + font-size: 1em; } /* Forms @@ -254,9 +254,9 @@ input, optgroup, select, textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ } /** @@ -264,7 +264,7 @@ textarea { */ button { - overflow: visible; + overflow: visible; } /** @@ -276,7 +276,7 @@ button { button, select { - text-transform: none; + text-transform: none; } /** @@ -291,8 +291,8 @@ button, html input[type="button"], /* 1 */ input[type="reset"], input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ } /** @@ -301,7 +301,7 @@ input[type="submit"] { button[disabled], html input[disabled] { - cursor: default; + cursor: default; } /** @@ -310,8 +310,8 @@ html input[disabled] { button::-moz-focus-inner, input::-moz-focus-inner { - border: 0; - padding: 0; + border: 0; + padding: 0; } /** @@ -320,7 +320,7 @@ input::-moz-focus-inner { */ input { - line-height: normal; + line-height: normal; } /** @@ -333,8 +333,8 @@ input { input[type="checkbox"], input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ } /** @@ -345,7 +345,7 @@ input[type="radio"] { input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { - height: auto; + height: auto; } /** @@ -354,8 +354,8 @@ input[type="number"]::-webkit-outer-spin-button { */ input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - box-sizing: content-box; /* 2 */ + -webkit-appearance: textfield; /* 1 */ + box-sizing: content-box; /* 2 */ } /** @@ -366,7 +366,7 @@ input[type="search"] { input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; + -webkit-appearance: none; } /** @@ -374,9 +374,9 @@ input[type="search"]::-webkit-search-decoration { */ fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } /** @@ -385,8 +385,8 @@ fieldset { */ legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ + border: 0; /* 1 */ + padding: 0; /* 2 */ } /** @@ -394,7 +394,7 @@ legend { */ textarea { - overflow: auto; + overflow: auto; } /** @@ -403,7 +403,7 @@ textarea { */ optgroup { - font-weight: bold; + font-weight: bold; } /* Tables @@ -414,11 +414,11 @@ optgroup { */ table { - border-collapse: collapse; - border-spacing: 0; + border-collapse: collapse; + border-spacing: 0; } td, th { - padding: 0; + padding: 0; } diff --git a/html/admin/index.html b/html/admin/index.html index 5b10703..5edf2a1 100644 --- a/html/admin/index.html +++ b/html/admin/index.html @@ -1,76 +1,97 @@ - + - - + + - - + + - + - - + + - + -
- +
- + - - - + + + - - - diff --git a/html/admin/js/app.js b/html/admin/js/app.js index 6c3a7a4..3ea2cff 100644 --- a/html/admin/js/app.js +++ b/html/admin/js/app.js @@ -1,132 +1,129 @@ -console.log("app.sh startup") +console.log("app.sh startup"); var app = angular.module("rvpnApp", ["ngRoute", "angular-duration-format"]); -app.config(function($routeProvider, $locationProvider) { +app.config(function ($routeProvider, $locationProvider) { $routeProvider - .when("/admin/status/", { - templateUrl : "admin/partials/status.html" - }) + .when("/admin/status/", { + templateUrl: "admin/partials/status.html" + }) - .when("/admin/index.html", { - templateUrl : "admin/partials/servers.html" - }) + .when("/admin/index.html", { + templateUrl: "admin/partials/servers.html" + }) - .when("/admin/servers/", { - templateUrl : "admin/partials/servers.html" - }) + .when("/admin/servers/", { + templateUrl: "admin/partials/servers.html" + }) - .when("/admin/#domains", { - templateUrl : "green.htm" - }) - - .when("/blue", { - templateUrl : "blue.htm" - }); + .when("/admin/#domains", { + templateUrl: "green.htm" + }) + + .when("/blue", { + templateUrl: "blue.htm" + }); $locationProvider.html5Mode(true); }); -app.filter('bytes', function() { - return function(bytes, precision) { - if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; - if (typeof precision === 'undefined') precision = 1; - var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], - number = Math.floor(Math.log(bytes) / Math.log(1024)); - return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; - } +app.filter("bytes", function () { + return function (bytes, precision) { + if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return "-"; + if (typeof precision === "undefined") precision = 1; + var units = ["bytes", "kB", "MB", "GB", "TB", "PB"], + number = Math.floor(Math.log(bytes) / Math.log(1024)); + return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + " " + units[number]; + }; }); -app.filter('hfcduration', function() { - return function(duration, precision) { - remain = duration - duration_day = 24*60*60 - duration_hour = 60*60 - duration_minute = 60 - duration_str = "" +app.filter("hfcduration", function () { + return function (duration, precision) { + remain = duration; + duration_day = 24 * 60 * 60; + duration_hour = 60 * 60; + duration_minute = 60; + duration_str = ""; - days = Math.floor(remain / duration_day) + days = Math.floor(remain / duration_day); if (days > 0) { - remain = remain - (days * duration_day) - duration_str = duration_str + days + 'd' + remain = remain - days * duration_day; + duration_str = duration_str + days + "d"; } - hours = Math.floor(remain / duration_hour) + hours = Math.floor(remain / duration_hour); if (hours > 0) { - remain = remain - (hours * duration_hour) - duration_str = duration_str + hours + 'h' + remain = remain - hours * duration_hour; + duration_str = duration_str + hours + "h"; } - mins = Math.floor(remain / duration_minute) + mins = Math.floor(remain / duration_minute); if (mins > 0) { - remain = remain - (mins * duration_minute) - duration_str = duration_str + mins + 'm' + remain = remain - mins * duration_minute; + duration_str = duration_str + mins + "m"; } - secs = Math.floor(remain) - duration_str = duration_str + secs + 's' - - return (duration_str); - } + secs = Math.floor(remain); + duration_str = duration_str + secs + "s"; + + return duration_str; + }; }); -app.controller('statusController', function ($scope, $http) { +app.controller("statusController", function ($scope, $http) { console.log("statusController"); $scope.status_search = ""; - var api = '/api/org.rootprojects.tunnel/status' - - $scope.updateView = function() { - $http.get(api).then(function(response) { + var api = "/api/org.rootprojects.tunnel/status"; + + $scope.updateView = function () { + $http.get(api).then(function (response) { console.log(response); data = response.data; - if (data.error == 'ok' ){ + if (data.error == "ok") { $scope.status = data.result; } }); - } - - $scope.updateView() + }; + $scope.updateView(); }); -app.controller('serverController', function ($scope, $http) { +app.controller("serverController", function ($scope, $http) { $scope.servers = []; $scope.servers_search = ""; $scope.servers_trigger_details = []; - $scope.filtered + $scope.filtered; - var api = '/api/org.rootprojects.tunnel/servers' - - $scope.updateView = function() { - $http.get(api).then(function(response) { + var api = "/api/org.rootprojects.tunnel/servers"; + + $scope.updateView = function () { + $http.get(api).then(function (response) { //console.log(response); data = response.data; - if (data.error == 'ok' ){ + if (data.error == "ok") { $scope.servers = data.result.servers; } }); - } + }; - $scope.triggerDetail = function(id) { + $scope.triggerDetail = function (id) { //console.log("triggerDetail ", id, $scope.servers_trigger_details[id]) if ($scope.servers_trigger_details[id] == true) { $scope.servers_trigger_details[id] = false; } else { - $scope.servers_trigger_details[id] = true + $scope.servers_trigger_details[id] = true; } }; - $scope.checkDetail = function(id) { + $scope.checkDetail = function (id) { //console.log("checkDetail ", id, $scope.servers_trigger_details[id]) if ($scope.servers_trigger_details[id] == true) { return false; } else { - return true + return true; } }; - $scope.updateView() - + $scope.updateView(); }); - diff --git a/html/admin/js/plugins.js b/html/admin/js/plugins.js index f887480..d9b3329 100644 --- a/html/admin/js/plugins.js +++ b/html/admin/js/plugins.js @@ -1,12 +1,32 @@ // Avoid `console` errors in browsers that lack a console. -(function() { +(function () { var method; var noop = function () {}; var methods = [ - 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', - 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', - 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', - 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' + "assert", + "clear", + "count", + "debug", + "dir", + "dirxml", + "error", + "exception", + "group", + "groupCollapsed", + "groupEnd", + "info", + "log", + "markTimeline", + "profile", + "profileEnd", + "table", + "time", + "timeEnd", + "timeline", + "timelineEnd", + "timeStamp", + "trace", + "warn" ]; var length = methods.length; var console = (window.console = window.console || {}); @@ -19,6 +39,6 @@ console[method] = noop; } } -}()); +})(); // Place any jQuery/helper plugins in here. diff --git a/html/admin/js/vendor/filter.js b/html/admin/js/vendor/filter.js index 56b5b4c..e5f262e 100644 --- a/html/admin/js/vendor/filter.js +++ b/html/admin/js/vendor/filter.js @@ -1,148 +1,165 @@ // ### filter.js >> -angular - .module('angular-duration-format.filter', [ ]) - .filter('duration', function() { +angular.module("angular-duration-format.filter", []).filter("duration", function () { var DURATION_FORMATS_SPLIT = /((?:[^ydhms']+)|(?:'(?:[^']|'')*')|(?:y+|d+|h+|m+|s+))(.*)/; var DURATION_FORMATS = { - y: { // years - // "longer" years are not supported - value: 365 * 24 * 60 * 60 * 1000, - }, - yy: { - value: 'y', - pad: 2, - }, - d: { // days - value: 24 * 60 * 60 * 1000, - }, - dd: { - value: 'd', - pad: 2, - }, - h: { // hours - value: 60 * 60 * 1000, - }, - hh: { // padded hours - value: 'h', - pad: 2, - }, - m: { // minutes - value: 60 * 1000, - }, - mm: { // padded minutes - value: 'm', - pad: 2, - }, - s: { // seconds - value: 1000, - }, - ss: { // padded seconds - value: 's', - pad: 2, - }, - sss: { // milliseconds - value: 1, - }, - ssss: { // padded milliseconds - value: 'sss', - pad: 4, - }, + y: { + // years + // "longer" years are not supported + value: 365 * 24 * 60 * 60 * 1000 + }, + yy: { + value: "y", + pad: 2 + }, + d: { + // days + value: 24 * 60 * 60 * 1000 + }, + dd: { + value: "d", + pad: 2 + }, + h: { + // hours + value: 60 * 60 * 1000 + }, + hh: { + // padded hours + value: "h", + pad: 2 + }, + m: { + // minutes + value: 60 * 1000 + }, + mm: { + // padded minutes + value: "m", + pad: 2 + }, + s: { + // seconds + value: 1000 + }, + ss: { + // padded seconds + value: "s", + pad: 2 + }, + sss: { + // milliseconds + value: 1 + }, + ssss: { + // padded milliseconds + value: "sss", + pad: 4 + } }; function _parseFormat(string) { - // @inspiration AngularJS date filter - var parts = []; - var format = string ? string.toString() : ''; + // @inspiration AngularJS date filter + var parts = []; + var format = string ? string.toString() : ""; - while (format) { - var match = DURATION_FORMATS_SPLIT.exec(format); + while (format) { + var match = DURATION_FORMATS_SPLIT.exec(format); - if (match) { - parts = parts.concat(match.slice(1)); + if (match) { + parts = parts.concat(match.slice(1)); - format = parts.pop(); - } else { - parts.push(format); + format = parts.pop(); + } else { + parts.push(format); - format = null; + format = null; + } } - } - return parts; + return parts; } function _formatDuration(timestamp, format) { - var text = ''; - var values = { }; + var text = ""; + var values = {}; - format.filter(function(format) { // filter only value parts of format - return DURATION_FORMATS.hasOwnProperty(format); - }).map(function(format) { // get formats with values only - var config = DURATION_FORMATS[format]; + format + .filter(function (format) { + // filter only value parts of format + return DURATION_FORMATS.hasOwnProperty(format); + }) + .map(function (format) { + // get formats with values only + var config = DURATION_FORMATS[format]; - if (config.hasOwnProperty('pad')) { - return config.value; - } else { - return format; - } - }).filter(function(format, index, arr) { // remove duplicates - return (arr.indexOf(format) === index); - }).map(function(format) { // get format configurations with values - return angular.extend({ - name: format, - }, DURATION_FORMATS[format]); - }).sort(function(a, b) { // sort formats descending by value - return b.value - a.value; - }).forEach(function(format) { // create values for format parts - var value = values[format.name] = Math.floor(timestamp / format.value); + if (config.hasOwnProperty("pad")) { + return config.value; + } else { + return format; + } + }) + .filter(function (format, index, arr) { + // remove duplicates + return arr.indexOf(format) === index; + }) + .map(function (format) { + // get format configurations with values + return angular.extend( + { + name: format + }, + DURATION_FORMATS[format] + ); + }) + .sort(function (a, b) { + // sort formats descending by value + return b.value - a.value; + }) + .forEach(function (format) { + // create values for format parts + var value = (values[format.name] = Math.floor(timestamp / format.value)); - timestamp = timestamp - (value * format.value); - }); + timestamp = timestamp - value * format.value; + }); - format.forEach(function(part) { - var format = DURATION_FORMATS[part]; + format.forEach(function (part) { + var format = DURATION_FORMATS[part]; - if (format) { - var value = values[format.value]; + if (format) { + var value = values[format.value]; - text += (format.hasOwnProperty('pad') ? _padNumber(value, Math.max(format.pad, value.toString().length)) : values[part]); - } else { - text += part.replace(/(^'|'$)/g, '').replace(/''/g, '\''); - } - }); + text += format.hasOwnProperty("pad") + ? _padNumber(value, Math.max(format.pad, value.toString().length)) + : values[part]; + } else { + text += part.replace(/(^'|'$)/g, "").replace(/''/g, "'"); + } + }); - return text; + return text; } function _padNumber(number, len) { - return ((new Array(len + 1)).join('0') + number).slice(-len); + return (new Array(len + 1).join("0") + number).slice(-len); } - return function(value, format) { - var parsedValue = parseFloat(value, 10); - var parsedFormat = _parseFormat(format); + return function (value, format) { + var parsedValue = parseFloat(value, 10); + var parsedFormat = _parseFormat(format); - if (isNaN(parsedValue) || (parsedFormat.length === 0)) { - return value; - } else { - return _formatDuration(parsedValue, parsedFormat); - } + if (isNaN(parsedValue) || parsedFormat.length === 0) { + return value; + } else { + return _formatDuration(parsedValue, parsedFormat); + } }; - }); - +}); // ### << filter.js - - // ### main.js >> -angular - .module('angular-duration-format', [ - 'angular-duration-format.filter', - ]); - +angular.module("angular-duration-format", ["angular-duration-format.filter"]); // ### << main.js - diff --git a/html/admin/partials/servers.html b/html/admin/partials/servers.html index 9eed22e..b927360 100644 --- a/html/admin/partials/servers.html +++ b/html/admin/partials/servers.html @@ -1,89 +1,98 @@
-
-
-
-
- Servers +
+
+
+
+ Servers +
+
+
+
+ + +
+ +
+
-
-
-
- - -
- -
-
-
+
-
-
- - - - - - - - - - - +
+
IDNameAddressXfer (in/out)Req/RespDurationStateIdle
+ + + + + + + + + - - - - - - + + + + + + - - - - - - -
IDNameAddressXfer (in/out)Req/RespDurationStateIdle +
+
{{ s.server_id }}{{ s.server_name }} - {{ s.source_address }} -
- domains({{ s.domains.length}}) -
-    {{ d.domain_name }} -
-
-
- {{ s.bytes_in | bytes }}/{{ s.bytes_out | bytes }} -
-   -
-    {{ d.bytes_in | bytes }}/{{ d.bytes_out | bytes }} -
-
-
- {{ s.requests }}/{{ s.responses }} -
-   -
-    {{ d.requests }}/{{ d.responses }} -
-
-
{{ s.server_id }}{{ s.server_name }} + {{ s.source_address }} +
+ domains({{ s.domains.length}}) +
+    {{ d.domain_name }} +
+
+
+ {{ s.bytes_in | bytes }}/{{ s.bytes_out | bytes }} +
+   +
+    {{ d.bytes_in | bytes }}/{{ d.bytes_out | bytes }} +
+
+
+ {{ s.requests }}/{{ s.responses }} +
+   +
+    {{ d.requests }}/{{ d.responses }} +
+
+
{{ s.duration | hfcduration }}{{ s.server_state }}{{ s.idle | hfcduration }} - -
-   -
- -
-
- - -
- - - - -
-
\ No newline at end of file + {{ s.duration | hfcduration }} + {{ s.server_state }} + {{ s.idle | hfcduration }} + + +
+   +
+ +
+
+ + + +
+
diff --git a/html/admin/partials/status.html b/html/admin/partials/status.html index 05f4569..8066fdc 100644 --- a/html/admin/partials/status.html +++ b/html/admin/partials/status.html @@ -1,46 +1,52 @@
-
-
-
-
- Status +
+
+
+
+ Status +
+
+
+
+ + +
+ +
+
-
-
-
- - -
- -
-
-
+
-
-
+
Server Name: {{ status.name }} (Uptime: {{ status.uptime | hfcduration }}
-
-
Administrative Domain: {{ status.admin_domain }}
+
+
Administrative Domain: {{ status.admin_domain }}
-
-
Server Domain: {{ status.wss_domain }}
+
+
Server Domain: {{ status.wss_domain }}
-
-
Default LB Method: {{ status.loadbalance_default_method }}
+
+
Default LB Method: {{ status.loadbalance_default_method }}
-
-
Deadtime: dwell:{{ status.dead_time.dwell}} idle:{{ status.dead_time.idle}} cancel:{{ status.dead_time.cancel_check}}
+
+
+ Deadtime: dwell:{{ status.dead_time.dwell}} idle:{{ status.dead_time.idle}} cancel:{{ + status.dead_time.cancel_check}} +
- - diff --git a/rvpn-docker/README.md b/rvpn-docker/README.md index c5fa66b..568a2da 100644 --- a/rvpn-docker/README.md +++ b/rvpn-docker/README.md @@ -1,7 +1,7 @@ # Docker Deployment for RVPN -- install docker 1.13, or the latest stable CE release (Testing on MAC using 17.03.0-ce-mac1 (15583)) -- validate installation +- install docker 1.13, or the latest stable CE release (Testing on MAC using 17.03.0-ce-mac1 (15583)) +- validate installation ```bash hcamacho@Hanks-MBP:rvpn-docker $ docker-compose --version @@ -10,7 +10,8 @@ docker-compose version 1.11.2, build dfed245 hcamacho@Hanks-MBP:rvpn-docker $ docker --version Docker version 17.03.0-ce, build 60ccb22 ``` -- checkout code into gopath + +- checkout code into gopath ```bash cd $GOPATH/src/git.coolaj86.com/coolaj86 @@ -23,7 +24,7 @@ go get ## Execute Container Deployment -- prep +- prep ```bash cd rvpn-docker @@ -42,7 +43,7 @@ Successfully built 182aa9c814f2 ``` -- execute container +- execute container ```bash hcamacho@Hanks-MBP:rvpn-docker $ docker-compose up @@ -87,6 +88,3 @@ rvpn_1 | INFO: genericlistener: 2017/03/04 18:13:02.270281 connection.go:242: W ``` The line "Connection Registration Accepted indicates a client WSS registered, was authenticated and registered its domains with the RVPN - - -