diff --git a/scripts/download b/scripts/download index f75d9f925c..1b70cb196d 100755 --- a/scripts/download +++ b/scripts/download @@ -26,13 +26,12 @@ case ${OS} in linux) git clone --single-branch --branch=${VERSION_RUNC} --depth=1 https://github.com/k3s-io/runc ${RUNC_DIR} curl --compressed -sfL https://github.com/k3s-io/k3s-root/releases/download/${VERSION_ROOT}/k3s-root-${ARCH}.tar | tar xf - - cp scripts/wg-add.sh bin/aux ;; windows) git clone --single-branch --branch=${VERSION_HCSSHIM} --depth=1 https://github.com/microsoft/hcsshim ${HCSSHIM_DIR} ;; *) - echo "[ERROR] unrecognized opertaing system: ${OS}" + echo "[ERROR] unrecognized operating system: ${OS}" exit 1 ;; esac diff --git a/scripts/version.sh b/scripts/version.sh index 84957bf66d..5784e89e18 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -76,7 +76,7 @@ if [ -z "$VERSION_KUBE_ROUTER" ]; then VERSION_KUBE_ROUTER="v0.0.0" fi -VERSION_ROOT="v0.13.0" +VERSION_ROOT="v0.14.0" DEPENDENCIES_URL="https://raw.githubusercontent.com/kubernetes/kubernetes/${VERSION_K8S}/build/dependencies.yaml" VERSION_GOLANG="go"$(curl -sL "${DEPENDENCIES_URL}" | yq e '.dependencies[] | select(.name == "golang: upstream version").version' -) diff --git a/scripts/wg-add.sh b/scripts/wg-add.sh deleted file mode 100755 index dc2f4a81c5..0000000000 --- a/scripts/wg-add.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -auto-mtu() { - local mtu=0 endpoint output - while read -r _ endpoint; do - [[ $endpoint =~ ^\[?([a-z0-9:.]+)\]?:[0-9]+$ ]] || continue - output="$(ip route get "${BASH_REMATCH[1]}" || true)" - [[ ( $output =~ mtu\ ([0-9]+) || ( $output =~ dev\ ([^ ]+) && $(ip link show dev "${BASH_REMATCH[1]}") =~ mtu\ ([0-9]+) ) ) && ${BASH_REMATCH[1]} -gt $mtu ]] && mtu="${BASH_REMATCH[1]}" - done < <(wg show "$1" endpoints) - if [[ $mtu -eq 0 ]]; then - read -r output < <(ip route show default || true) || true - [[ ( $output =~ mtu\ ([0-9]+) || ( $output =~ dev\ ([^ ]+) && $(ip link show dev "${BASH_REMATCH[1]}") =~ mtu\ ([0-9]+) ) ) && ${BASH_REMATCH[1]} -gt $mtu ]] && mtu="${BASH_REMATCH[1]}" - fi - [[ $mtu -gt 0 ]] || mtu=1500 - ip link set mtu $(( mtu - 80 )) up dev "$1" -} - -# probe for any modules that may be needed -modprobe wireguard -modprobe tun - -# try wireguard kernel module first -ip link add "$1" type wireguard && exit - -# try boringtun and let it drop privileges -boringtun "$1" && auto-mtu "$1" && exit - -# try boringtun w/o dropping privileges -WG_SUDO=1 boringtun "$1" && auto-mtu "$1" && exit - -# try wireguard-go - p.s. should not use wireguard-go, it leaks memory -WG_I_PREFER_BUGGY_USERSPACE_TO_POLISHED_KMOD=1 wireguard-go "$1" && auto-mtu "$1" && exit - -exit 1