diff --git a/front/admin.html b/front/admin.html index c7dd8d6..88e26f7 100644 --- a/front/admin.html +++ b/front/admin.html @@ -22,14 +22,32 @@
- .mytld + 21

After clicking "Add", the new peer's config will appear below. Copy and paste it into your wireguard client and start the service. This configuration will not be shown again! If you lose the config, you will need to delete the peer and recreate it.

+ +

Add user

+

To add a new user, type in the user's first device name and a username and click 'add'. The hostname and username must each be 3-10 lowercase letters and numbers /[a-z0-9]{3,10}/.

+
+ + + +
+

After clicking "Add", the new user's first peer config will appear below. Copy and paste it into your wireguard client and start the service. This configuration will not be shown again! If you lose the config, you will need to delete the peer and recreate it.

+ +

Delete User

+

To delete a user, select the username from the list below and click 'Delete'. This will delete the user and all their peers.

+
+ + 21 + +
+

 
-	
+	
 	
 
 
diff --git a/front/knockout-latest.min.js b/front/knockout-latest.min.js
new file mode 100644
index 0000000..4b77def
--- /dev/null
+++ b/front/knockout-latest.min.js
@@ -0,0 +1 @@
+!function(a){var g,b=this||eval("this"),c=b.document,d=b.navigator,e=b.jQuery,f=b.JSON;e||"undefined"==typeof jQuery||(e=jQuery),g=function(t,u){function n(e,t){return(null===e||typeof e in j)&&e===t}function i(e,t){var n;return function(){n=n||_.a.setTimeout(function(){n=a,e()},t)}}function o(e,t){var n;return function(){clearTimeout(n),n=_.a.setTimeout(e,t)}}function s(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function r(e,t){null!==t&&t.s&&t.s()}function l(e,t){var n=this.qd,a=n[V];a.ra||(this.Qb&&this.mb[t]?(n.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):a.I[t]||n.uc(t,e,a.J?{da:e}:n.$c(e)),e.Ja&&e.gd())}var p,h,v,g,m,y,w,x,C,E,k,T,N,_=void 0!==t?t:{};function S(){if(k)for(var e,t=k,n=0;Ne.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return _.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!_.a.Lb(e,_.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return _.onError?function(){try{return e.apply(this,arguments)}catch(e){throw _.onError&&_.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(_.a.Ac(e),t)},Gc:function(e){setTimeout(function(){throw _.onError&&_.onError(e),e},0)},B:function(t,n,a){var r=_.a.Ac(a);if(a=v[n],_.options.useOnlyNativeEvents||a||!e)if(a||"function"!=typeof t.addEventListener){if(void 0===t.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");function i(e){r.call(t,e)}var o="on"+n;t.attachEvent(o,i),_.a.K.za(t,function(){t.detachEvent(o,i)})}else t.addEventListener(n,r,!1);else h=h||("function"==typeof e(t).on?"on":"bind"),e(t)[h](n,r)},Fb:function(t,n){if(!t||!t.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var a;if(a=!("input"!==_.a.R(t)||!t.type||"click"!=n.toLowerCase())&&("checkbox"==(a=t.type)||"radio"==a),_.options.useOnlyNativeEvents||!e||a)if("function"==typeof c.createEvent){if("function"!=typeof t.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(a=c.createEvent(l[n]||"HTMLEvents")).initEvent(n,!0,!0,b,0,0,0,0,0,!1,!1,!1,!1,0,t),t.dispatchEvent(a)}else if(a&&t.click)t.click();else{if(void 0===t.fireEvent)throw Error("Browser doesn't support triggering events");t.fireEvent("on"+n)}else e(t).trigger(n)},f:function(e){return _.O(e)?e():e},bc:function(e){return _.O(e)?e.v():e},Eb:function(t,e,n){var a;e&&("object"==typeof t.classList?(a=t.classList[n?"add":"remove"],_.a.D(e.match(m),function(e){a.call(t.classList,e)})):"string"==typeof t.className.baseVal?r(t.className,"baseVal",e,n):r(t,"className",e,n))},Bb:function(e,t){var n=_.a.f(t);null!==n&&n!==a||(n="");var r=_.h.firstChild(e);!r||3!=r.nodeType||_.h.nextSibling(r)?_.h.va(e,[e.ownerDocument.createTextNode(n)]):r.data=n,_.a.Ad(e)},Yc:function(e,t){if(e.name=t,g<=7)try{var n=e.name.replace(/[&<>'"]/g,function(e){return"&#"+e.charCodeAt(0)+";"});e.mergeAttributes(c.createElement(""),!1)}catch(e){}},Ad:function(e){9<=g&&((e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom))},wd:function(e){if(g){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=_.a.f(e),t=_.a.f(t);for(var n=[],a=e;a<=t;a++)n.push(a);return n},la:function(e){for(var t=[],n=0,a=e.length;n",""],tbody:h,tfoot:h,tr:[2,"","
"],td:v=[3,"","
"],th:v,option:g=[1,""],optgroup:g},y=_.a.W<=8,_.a.ua=function(t,n){var a;if(e){if(e.parseHTML)a=e.parseHTML(t,n)||[];else if((a=e.clean([t],n))&&a[0]){for(var r=a[0];r.parentNode&&11!==r.parentNode.nodeType;)r=r.parentNode;r.parentNode&&r.parentNode.removeChild(r)}}else{(a=n)||(a=c);r=a.parentWindow||a.defaultView||b;var i,o=_.a.Db(t).toLowerCase(),u=a.createElement("div");for(o=(i=(o=o.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&m[o[1]]||p)[0],i="ignored
"+i[1]+t+i[2]+"
","function"==typeof r.innerShiv?u.appendChild(r.innerShiv(i)):(y&&a.body.appendChild(u),u.innerHTML=i,y&&u.parentNode.removeChild(u));o--;)u=u.lastChild;a=_.a.la(u.lastChild.childNodes)}return a},_.a.Md=function(e,t){var n=_.a.ua(e,t);return n.length&&n[0].parentElement||_.a.Yb(n)},_.a.fc=function(t,n){if(_.a.Tb(t),null!==(n=_.a.f(n))&&n!==a)if("string"!=typeof n&&(n=n.toString()),e)e(t).html(n);else for(var r=_.a.ua(n,t.ownerDocument),i=0;i]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,me=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g,{xd:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,function(e){return _.kc.Ld(e,t)},n)},Ld:function(e,i){return e.replace(ge,function(e,t,n,a,r){return Ce(r,t,n,i)}).replace(me,function(e,t){return Ce(t,"\x3c!-- ko --\x3e","#comment",i)})},md:function(a,r){return _.aa.Xb(function(e,t){var n=e.nextSibling;n&&n.nodeName.toLowerCase()===r&&_.ib(n,a,t)})}}),_.b("__tr_ambtns",_.kc.md),function(){_.C={},_.C.F=function(e){if(this.F=e){var t=_.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},_.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"==e?_.a.fc(this.F,t):this.F[e]=t};var t=_.a.g.Z()+"_";_.C.F.prototype.data=function(e){if(1===arguments.length)return _.a.g.get(this.F,t+e);_.a.g.set(this.F,t+e,arguments[1])};var i=_.a.g.Z();_.C.F.prototype.nodes=function(){var e=this.F;if(0==arguments.length){var t=_.a.g.get(e,i)||{},n=t.lb||(3===this.ab?e.content:4===this.ab?e:a);if(!n||t.jd){var r=this.text();r&&r!==t.bb&&(n=_.a.Md(r,e.ownerDocument),_.a.g.set(e,i,{lb:n,bb:r,jd:!0}))}return n}t=arguments[0],this.ab!==a&&this.text(""),_.a.g.set(e,i,{lb:t})},_.C.ia=function(e){this.F=e},_.C.ia.prototype=new _.C.F,_.C.ia.prototype.constructor=_.C.ia,_.C.ia.prototype.text=function(){if(0==arguments.length){var e=_.a.g.get(this.F,i)||{};return e.bb===a&&e.lb&&(e.bb=e.lb.innerHTML),e.bb}_.a.g.set(this.F,i,{bb:arguments[0]})},_.b("templateSources",_.C),_.b("templateSources.domElement",_.C.F),_.b("templateSources.anonymousTemplate",_.C.ia)}(),function(){function c(e,t,n){var a;for(t=_.h.nextSibling(t);e&&(a=e)!==t;)n(a,e=_.h.nextSibling(a))}function p(e,t){if(e.length){var r=e[0],i=e[e.length-1],n=r.parentNode,o=_.ga.instance,u=o.preprocessNode;if(u){if(c(r,i,function(e,t){var n=e.previousSibling,a=u.call(o,e);a&&(e===r&&(r=a[0]||t),e===i&&(i=a[a.length-1]||n))}),e.length=0,!r)return;r===i?e.push(r):(e.push(r,i),_.a.Ua(e,n))}c(r,i,function(e){1!==e.nodeType&&8!==e.nodeType||_.vc(t,e)}),c(r,i,function(e){1!==e.nodeType&&8!==e.nodeType||_.aa.cd(e,[t])}),_.a.Ua(e,n)}}function s(e){return e.nodeType?e:0"+t+"<\/script>")},0