Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii authored Apr 1, 2024
1 parent 262f058 commit 7371b80
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ is_loadbalancing_enabled() {
get_wgkex_data(){
local version="$1"
WGKEX_BROKER="$PROTO://$WGKEX_BROKER_BASE_PATH/api/$version/wg/key/exchange"
local user_agent="OpenWrt xx.xx Gluon xx.xx checkuplink x.x"

local user_agent="Mozilla/5.0 OpenWrt xx.xx Gluon xx.xx Modell/xxx checkuplink/1.0"
#more examples
#OpenWrt/21.02.0 (GLUON/2024.1; Checkuplink/2.0) x64
logger -p info -t checkuplink "Contacting wgkex broker $WGKEX_BROKER"

if ! WGKEX_DATA=$(force_wan_connection wget -q -U=$user_agent -O- --post-data='{"domain": "'"$SEGMENT"'","public_key": "'"$PUBLICKEY"'"}' "$WGKEX_BROKER"); then

Check warning on line 128 in ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink

View workflow job for this annotation

GitHub Actions / runner / shellcheck

[shellcheck] reported by reviewdog 🐶 Double quote to prevent globbing and word splitting. Raw Output: ./ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink:128:52: info: Double quote to prevent globbing and word splitting. (ShellCheck.SC2086)

Check failure on line 128 in ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink

View workflow job for this annotation

GitHub Actions / runner / shellcheck

[shellcheck (suggestion)] reported by reviewdog 🐶 Raw Output: ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink:128:- if ! WGKEX_DATA=$(force_wan_connection wget -q -U=$user_agent -O- --post-data='{"domain": "'"$SEGMENT"'","public_key": "'"$PUBLICKEY"'"}' "$WGKEX_BROKER"); then ffmuc-mesh-vpn-wireguard-vxlan/files/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink:128:+ if ! WGKEX_DATA=$(force_wan_connection wget -q -U="$user_agent" -O- --post-data='{"domain": "'"$SEGMENT"'","public_key": "'"$PUBLICKEY"'"}' "$WGKEX_BROKER"); then
Expand Down

0 comments on commit 7371b80

Please sign in to comment.