You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
. /usr/lib/network/network
: ${WIREGUARD:=wg-quick}
[[ -z "$WG_CONFIG" ]] && WG_CONFIG='/etc/wireguard/default.conf'
wireguard_up() {
load_profile "$1"
"${WIREGUARD}" up "${WG_CONFIG}"
if [[ $? -ne 0 ]]; then
report_fail "wireguard connection failed."
exit 1
fi
}
wireguard_down() {
load_profile "$1"
"${WIREGUARD}" down "${WG_CONFIG}"
if [[ $? -ne 0 ]]; then
report_fail "wireguard disconnection failed."
fi
}
wireguard_$1 "$2"
exit $?
/etc/network.d/examples/wireguard:
CONNECTION="wireguard"
# WIREGUARD="wg-quick" # Optional; specifies the `wg-quick` compatible executable to use. If not specified, defaults to `wg-quick`.
INTERFACE="wg-ai"
WG_CONFIG="/etc/wireguard/wg-ai.conf" # Specify the wireguard configuration to use.
Depends on wireguard-tools and, of course, wireguard support in the kernel.
Fell free to incorporate. I don't know how to do pull requests, so I post it here that way.
The text was updated successfully, but these errors were encountered:
I have added a
wireguard
-connection:/usr/lib/network/connections/wireguard
:/etc/network.d/examples/wireguard
:Depends on
wireguard-tools
and, of course, wireguard support in the kernel.Fell free to incorporate. I don't know how to do pull requests, so I post it here that way.
The text was updated successfully, but these errors were encountered: