mirror of https://github.com/dnomd343/TProxy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
794 B
18 lines
794 B
4 years ago
|
get_github_latest_version() {
|
||
|
VERSION=$(curl --silent "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/');
|
||
|
}
|
||
|
|
||
|
ASSET_DIR="/tmp/asset"
|
||
|
mkdir -p $ASSET_DIR/pkg
|
||
|
|
||
|
XRAY_PKG_NAME="Xray-linux-arm64-v8a.zip"
|
||
|
get_github_latest_version "XTLS/Xray-core"
|
||
|
wget -P $ASSET_DIR/pkg "https://hub.fastgit.org/XTLS/Xray-core/releases/download/$VERSION/$XRAY_PKG_NAME"
|
||
|
unzip $ASSET_DIR/pkg/$XRAY_PKG_NAME -d /$ASSET_DIR/pkg
|
||
|
cp $ASSET_DIR/pkg/xray $ASSET_DIR
|
||
|
rm -rf $ASSET_DIR/pkg
|
||
|
|
||
|
get_github_latest_version "Loyalsoldier/v2ray-rules-dat"
|
||
|
wget -P $ASSET_DIR "https://hub.fastgit.org/Loyalsoldier/v2ray-rules-dat/releases/download/$VERSION/geoip.dat"
|
||
|
wget -P $ASSET_DIR "https://hub.fastgit.org/Loyalsoldier/v2ray-rules-dat/releases/download/$VERSION/geosite.dat"
|