1
0
mirror of synced 2024-12-03 18:16:02 +03:00

Compare commits

...

4 Commits

Author SHA1 Message Date
hwdsl2
963a49d61a Update tests 2022-05-26 00:16:51 -05:00
hwdsl2
bc096da0b4 Update docs 2022-05-26 00:00:02 -05:00
hwdsl2
34d9ad06d5 New Libreswan version
- Support upgrading to Libreswan 4.7.
2022-05-25 23:59:21 -05:00
hwdsl2
5f1f444a8f New Libreswan version
- Use new Libreswan version 4.7.
  Ref: https://lists.libreswan.org/pipermail/swan-announce/2022/000047.html
2022-05-25 23:57:30 -05:00
12 changed files with 19 additions and 16 deletions

View File

@ -465,12 +465,13 @@ jobs:
cp -f /opt/src/scripts/extras/vpnupgrade.sh ./vpnup.sh cp -f /opt/src/scripts/extras/vpnupgrade.sh ./vpnup.sh
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh
for ver in 4.4 ""; do for ver in 4.5 ""; do
sed -i "s/^SWAN_VER=.*/SWAN_VER=$ver/" vpnup.sh sed -i "s/^SWAN_VER=.*/SWAN_VER=$ver/" vpnup.sh
bash vpnup.sh <<ANSWERS bash vpnup.sh <<ANSWERS
ANSWERS ANSWERS
restart_ipsec restart_ipsec
[ -z "$ver" ] && ver=4.7
ipsec --version | grep "$ver" ipsec --version | grep "$ver"
ipsec status | grep -q l2tp-psk ipsec status | grep -q l2tp-psk
ipsec status | grep -q xauth-psk ipsec status | grep -q xauth-psk
@ -484,12 +485,13 @@ jobs:
fi fi
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
for ver in 4.5 ""; do for ver in 4.6 ""; do
sed -i "s/^SWAN_VER=.*/SWAN_VER=$ver/" vpnup.sh sed -i "s/^SWAN_VER=.*/SWAN_VER=$ver/" vpnup.sh
bash vpnup.sh <<ANSWERS bash vpnup.sh <<ANSWERS
ANSWERS ANSWERS
restart_ipsec restart_ipsec
[ -z "$ver" ] && ver=4.7
ipsec --version | grep "$ver" ipsec --version | grep "$ver"
ipsec status | grep -q l2tp-psk ipsec status | grep -q l2tp-psk
ipsec status | grep -q xauth-psk ipsec status | grep -q xauth-psk

View File

@ -77,7 +77,7 @@ jobs:
echo "# hwdsl2" > run.sh echo "# hwdsl2" > run.sh
if [ "$os_type" = "alpine" ]; then if [ "$os_type" = "alpine" ]; then
apk add -U wget rsyslog sed apk add -U wget rsyslog sed bash
rsyslogd rsyslogd
else else
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
@ -480,8 +480,7 @@ jobs:
cp -f "$GITHUB_WORKSPACE"/extras/vpnupgrade.sh ./vpnup.sh cp -f "$GITHUB_WORKSPACE"/extras/vpnupgrade.sh ./vpnup.sh
sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh sed -i '/curl /a sed -i "/swan_ver_latest=/s/^/#/" "$tmpdir/vpnup.sh"' vpnup.sh
[ "$os_type" = "alpine" ] && ver1=4.5 || ver1=4.4 for ver in 4.5 ""; do
for ver in "$ver1" ""; do
if [ "$os_type" = "alpine" ]; then if [ "$os_type" = "alpine" ]; then
ipsec whack --shutdown || true ipsec whack --shutdown || true
fi fi
@ -490,6 +489,7 @@ jobs:
ANSWERS ANSWERS
restart_ipsec restart_ipsec
[ -z "$ver" ] && ver=4.7
ipsec --version | grep "$ver" ipsec --version | grep "$ver"
ipsec status | grep -q l2tp-psk ipsec status | grep -q l2tp-psk
ipsec status | grep -q xauth-psk ipsec status | grep -q xauth-psk
@ -503,7 +503,7 @@ jobs:
fi fi
sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh sed -i '/swan_ver_latest=/s/^/#/' vpnup.sh
for ver in 4.5 ""; do for ver in 4.6 ""; do
if [ "$os_type" = "alpine" ]; then if [ "$os_type" = "alpine" ]; then
ipsec whack --shutdown || true ipsec whack --shutdown || true
fi fi
@ -512,6 +512,7 @@ jobs:
ANSWERS ANSWERS
restart_ipsec restart_ipsec
[ -z "$ver" ] && ver=4.7
ipsec --version | grep "$ver" ipsec --version | grep "$ver"
ipsec status | grep -q l2tp-psk ipsec status | grep -q l2tp-psk
ipsec status | grep -q xauth-psk ipsec status | grep -q xauth-psk

View File

@ -235,7 +235,7 @@ curl -fsSL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/vpnupgr
如果无法下载,打开 [vpnupgrade.sh](extras/vpnupgrade.sh),然后点击右边的 `Raw` 按钮。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。 如果无法下载,打开 [vpnupgrade.sh](extras/vpnupgrade.sh),然后点击右边的 `Raw` 按钮。按快捷键 `Ctrl/Cmd+A` 全选,`Ctrl/Cmd+C` 复制,然后粘贴到你喜欢的编辑器。
</details> </details>
当前支持的 Libreswan 最新版本是 `4.6`。查看已安装版本:`ipsec --version`。 当前支持的 Libreswan 最新版本是 `4.7`。查看已安装版本:`ipsec --version`。
**注:** `xl2tpd` 可以使用系统的软件包管理器进行更新,例如 Ubuntu/Debian 上的 `apt-get` **注:** `xl2tpd` 可以使用系统的软件包管理器进行更新,例如 Ubuntu/Debian 上的 `apt-get`

View File

@ -235,7 +235,7 @@ curl -fsSL https://gitlab.com/hwdsl2/setup-ipsec-vpn/-/raw/master/extras/vpnupgr
If you are unable to download, open [vpnupgrade.sh](extras/vpnupgrade.sh), then click the `Raw` button on the right. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor. If you are unable to download, open [vpnupgrade.sh](extras/vpnupgrade.sh), then click the `Raw` button on the right. Press `Ctrl/Cmd+A` to select all, `Ctrl/Cmd+C` to copy, then paste into your favorite editor.
</details> </details>
The latest supported Libreswan version is `4.6`. Check installed version: `ipsec --version`. The latest supported Libreswan version is `4.7`. Check installed version: `ipsec --version`.
**Note:** `xl2tpd` can be updated using your system's package manager, such as `apt-get` on Ubuntu/Debian. **Note:** `xl2tpd` can be updated using your system's package manager, such as `apt-get` on Ubuntu/Debian.

View File

@ -69,7 +69,7 @@ EOF
} }
get_swan_ver() { get_swan_ver() {
swan_ver_cur=4.6 swan_ver_cur=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver" swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)

View File

@ -52,7 +52,7 @@ EOF
} }
get_swan_ver() { get_swan_ver() {
swan_ver_cur=4.6 swan_ver_cur=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/upg-v1-amzn-2-swanver" swan_ver_url="$base_url/upg-v1-amzn-2-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)

View File

@ -78,7 +78,7 @@ EOF
} }
get_swan_ver() { get_swan_ver() {
swan_ver_cur=4.6 swan_ver_cur=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver" swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)

View File

@ -75,7 +75,7 @@ EOF
} }
get_swan_ver() { get_swan_ver() {
swan_ver_cur=4.6 swan_ver_cur=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver" swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1)

View File

@ -224,7 +224,7 @@ get_helper_scripts() {
} }
get_swan_ver() { get_swan_ver() {
SWAN_VER=4.6 SWAN_VER=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver" swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1)

View File

@ -224,7 +224,7 @@ get_helper_scripts() {
} }
get_swan_ver() { get_swan_ver() {
SWAN_VER=4.6 SWAN_VER=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/v1-amzn-2-swanver" swan_ver_url="$base_url/v1-amzn-2-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1)

View File

@ -306,7 +306,7 @@ get_helper_scripts() {
} }
get_swan_ver() { get_swan_ver() {
SWAN_VER=4.6 SWAN_VER=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver" swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1)

View File

@ -275,7 +275,7 @@ get_helper_scripts() {
} }
get_swan_ver() { get_swan_ver() {
SWAN_VER=4.6 SWAN_VER=4.7
base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0"
swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver" swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver"
swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1) swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" 2>/dev/null | head -n 1)