Browse Source

add active button on join

master
zeus 4 years ago
parent
commit
fb9774b756
  1. 2
      client/index.html
  2. 2
      client/js/app.5d70420c.js
  3. 1
      client/js/app.5d70420c.js.map
  4. 4
      llo/connect-new.js
  5. 1
      test
  6. 52
      wg-json

2
client/index.html

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.ea5082e6.css" rel="preload" as="style"><link href="/css/chunk-vendors.d0de25b8.css" rel="preload" as="style"><link href="/js/app.40fd9f09.js" rel="preload" as="script"><link href="/js/chunk-vendors.1ae3a34a.js" rel="preload" as="script"><link href="/css/chunk-vendors.d0de25b8.css" rel="stylesheet"><link href="/css/app.ea5082e6.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.1ae3a34a.js"></script><script src="/js/app.40fd9f09.js"></script></body></html>
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.ea5082e6.css" rel="preload" as="style"><link href="/css/chunk-vendors.d0de25b8.css" rel="preload" as="style"><link href="/js/app.5d70420c.js" rel="preload" as="script"><link href="/js/chunk-vendors.1ae3a34a.js" rel="preload" as="script"><link href="/css/chunk-vendors.d0de25b8.css" rel="stylesheet"><link href="/css/app.ea5082e6.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.1ae3a34a.js"></script><script src="/js/app.5d70420c.js"></script></body></html>

2
client/js/app.5d70420c.js

File diff suppressed because one or more lines are too long

1
client/js/app.5d70420c.js.map

File diff suppressed because one or more lines are too long

4
llo/connect-new.js

@ -453,7 +453,7 @@ app.get('/getserviceshybridstatus', (req, res, next) => {
if (stdout) {
var string = stdout.toString()
var datajson = JSON.parse(string);
/*
var search = RES.bootstrapstackname
var extenderror = new RegExp(search);
var found = 'no';
@ -464,7 +464,7 @@ app.get('/getserviceshybridstatus', (req, res, next) => {
found = 'yes';
}
}
*/
RES.error = false
RES.error_msg = "ok"
RES.test = datajson;

1
test

@ -0,0 +1 @@
docker exec -it swarmlabwg-QeNNwRr5tj1evRh58wuxUA80fIo6e0QH /bin/bash -c "wg show swlabQeNNwRr5tj allowed-ips | grep 'uML/dUKzfAYRA0o7T+1mS8jMvap2OP9aAs5e4rKK418='"

52
wg-json

@ -0,0 +1,52 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
exec < <(exec wg show all dump)
printf '{'
while read -r -d $'\t' device; do
if [[ $device != "$last_device" ]]; then
[[ -z $last_device ]] && printf '\n' || printf '%s,\n' "$end"
last_device="$device"
read -r private_key public_key listen_port fwmark
printf '\t"%s": {' "$device"
delim=$'\n'
[[ $private_key == "(none)" ]] || { printf '%s\t\t"privateKey": "%s"' "$delim" "$private_key"; delim=$',\n'; }
[[ $public_key == "(none)" ]] || { printf '%s\t\t"publicKey": "%s"' "$delim" "$public_key"; delim=$',\n'; }
[[ $listen_port == "0" ]] || { printf '%s\t\t"listenPort": %u' "$delim" $(( $listen_port )); delim=$',\n'; }
[[ $fwmark == "off" ]] || { printf '%s\t\t"fwmark": %u' "$delim" $(( $fwmark )); delim=$',\n'; }
printf '%s\t\t"peers": {' "$delim"; end=$'\n\t\t}\n\t}'
delim=$'\n'
else
read -r public_key preshared_key endpoint allowed_ips latest_handshake transfer_rx transfer_tx persistent_keepalive
printf '%s\t\t\t"%s": {' "$delim" "$public_key"
delim=$'\n'
[[ $preshared_key == "(none)" ]] || { printf '%s\t\t\t\t"presharedKey": "%s"' "$delim" "$preshared_key"; delim=$',\n'; }
[[ $endpoint == "(none)" ]] || { printf '%s\t\t\t\t"endpoint": "%s"' "$delim" "$endpoint"; delim=$',\n'; }
[[ $latest_handshake == "0" ]] || { printf '%s\t\t\t\t"latestHandshake": %u' "$delim" $(( $latest_handshake )); delim=$',\n'; }
[[ $transfer_rx == "0" ]] || { printf '%s\t\t\t\t"transferRx": %u' "$delim" $(( $transfer_rx )); delim=$',\n'; }
[[ $transfer_tx == "0" ]] || { printf '%s\t\t\t\t"transferTx": %u' "$delim" $(( $transfer_tx )); delim=$',\n'; }
[[ $persistent_keepalive == "off" ]] || { printf '%s\t\t\t\t"persistentKeepalive": %u' "$delim" $(( $persistent_keepalive )); delim=$',\n'; }
printf '%s\t\t\t\t"allowedIps": [' "$delim"
delim=$'\n'
if [[ $allowed_ips != "(none)" ]]; then
old_ifs="$IFS"
IFS=,
for ip in $allowed_ips; do
printf '%s\t\t\t\t\t"%s"' "$delim" "$ip"
delim=$',\n'
done
IFS="$old_ifs"
delim=$'\n'
fi
printf '%s\t\t\t\t]' "$delim"
printf '\n\t\t\t}'
delim=$',\n'
fi
done
printf '%s\n' "$end"
printf '}\n'
Loading…
Cancel
Save