2022-09-15 08:47:17 -06:00
< html >
< head >
< title > Wireguard Admin< / title >
< / head >
< body >
< p > Use this console to edit network-connected devices. < / p >
< h2 > Peers< / h2 >
< table >
< thead > < tr >
2022-09-15 21:50:35 -06:00
< th > Host< / th > < th > IPv4< / th > < th > < / th >
2022-09-15 08:47:17 -06:00
< / tr > < / thead >
< tbody data-bind = "foreach:peers" > < tr >
2022-09-15 21:50:35 -06:00
< td data-bind = "text:domain" > < / td >
< td data-bind = "text:ipv4" > < / td >
2022-09-15 08:47:17 -06:00
< td > < button style = "float:right" data-bind = "click:$parent.delPeer,disable:$data.isDeleting,text:deleteText" > Delete< / button > < / td >
< / tr > < / tbody >
< / table >
2022-09-18 17:44:49 -06:00
< h2 > Add peer< / h2 >
2022-09-18 17:33:19 -06:00
< p > To add a new peer, type in a hostname and select a user. The hostname must be 3-10 lowercase letters and numbers < code > /[a-z0-9]{3,10}/< / code > . < / p >
2022-09-15 08:47:17 -06:00
< div >
2022-09-18 18:03:33 -06:00
< input type = "text" data-bind = "textInput:newPeerHostname,event:{keypress:addKeyPress}" placeholder = "phone" > < / input >
2022-09-18 20:27:11 -06:00
< select data-bind = "options:users,optionsText:'name',value:newPeerUser,optionsCaption:'(user)'" > < / select >
2022-09-18 17:33:19 -06:00
< span > .mytld< / span >
2022-09-21 19:18:21 -06:00
< button data-bind = "click:addPeer,disable:isAddingPeer,text:addPeerText" > Add< / button >
2022-09-15 08:47:17 -06:00
< / div >
2022-09-18 20:48:32 -06:00
< p > After clicking "Add", the new peer's config will appear below. Copy and paste it into your wireguard client and start the service. < b > This configuration will not be shown again!< / b > If you lose the config, you will need to delete the peer and recreate it. < / p >
2022-09-15 08:47:17 -06:00
< hr >
2022-09-18 17:33:19 -06:00
< pre data-bind = "text:newConfigText" > < / pre >
2022-09-15 08:47:17 -06:00
< script src = "https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.1/knockout-latest.js" integrity = "sha512-2AL/VEauKkZqQU9BHgnv48OhXcJPx9vdzxN1JrKDVc4FPU/MEE/BZ6d9l0mP7VmvLsjtYwqiYQpDskK9dG8KBA==" crossorigin = "anonymous" referrerpolicy = "no-referrer" > < / script >
< script src = "/admin.js" > < / script >
< / body >
< / html >