From 33a47a088dca0b8ea40c6a0f229b45ee5e7cc213 Mon Sep 17 00:00:00 2001 From: Kiritow <1362050620@qq.com> Date: Fri, 30 Jul 2021 23:57:24 +0800 Subject: [PATCH] Add new install scripts --- install.sh | 2 +- install_cn.sh | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 install_cn.sh diff --git a/install.sh b/install.sh index 9d53f15..5f818e7 100755 --- a/install.sh +++ b/install.sh @@ -8,8 +8,8 @@ mkdir -p local mkdir -p bin cd bin -curl -vL https://github.com/wangyu-/udp2raw-tunnel/releases/download/20200818.0/udp2raw_binaries.tar.gz -o udp2raw.tgz +curl -vL https://github.com/wangyu-/udp2raw-tunnel/releases/download/20200818.0/udp2raw_binaries.tar.gz -o udp2raw.tgz tar -xvzf udp2raw.tgz udp2raw_amd64 chmod +x udp2raw_amd64 rm udp2raw.tgz diff --git a/install_cn.sh b/install_cn.sh new file mode 100644 index 0000000..9a40e23 --- /dev/null +++ b/install_cn.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -xe + +sudo apt update +sudo apt install -y curl wireguard python3 + +mkdir -p local + +mkdir -p bin +cd bin + +git clone https://gitee.com/kiritow/wg-op-binary +cd wg-op-binary + +openssl enc -aes-256-cbc -pbkdf2 -a -d -in bin.01 -out ../udp2raw_amd64 +openssl enc -aes-256-cbc -pbkdf2 -a -d -in bin.02 -out ../speederv2_amd64 + +cd .. +rm -rf wg-op-binary + +cd .. + +VERIFIED_HASH="a7ce38b2c30980be4e71c3af8a9c1db8183db349c699fa6f843e67add7e6cca2" +TEMP_HASH=$(sha256sum bin/udp2raw_amd64 | awk '{print $1}') +if [ "$TEMP_HASH" == "$VERIFIED_HASH" ] +then + echo "[OK] udp2raw hash match: $TEMP_HASH" +else + echo "[WARN] udp2raw hash mismatch: $TEMP_HASH. Expected: $VERIFIED_HASH" +fi + +VERIFIED_HASH="3cf8f6c1e9baa530170368efb8a4bfcd6e75f88c2726ecbf2a75261dd1dd9fd5" +TEMP_HASH=$(sha256sum bin/speederv2_amd64 | awk '{print $1}') +if [ "$TEMP_HASH" == "$VERIFIED_HASH" ] +then + echo "[OK] speederv2 hash match: $TEMP_HASH" +else + echo "[WARN] speederv2 hash mismatch: $TEMP_HASH. Expected: $VERIFIED_HASH" +fi