seagullz4 / hysteria2

hysteria2一键安装精简版/hy2一键安装/hysteria2 install/نصب با یک کلیک hysteria2/祝大家万事如意,心想事成
619 stars 63 forks source link

578行从hysteria2官网直接下载最新的服务端程序可能因为解析问题卡死 #22

Closed lzyjxqt closed 2 months ago

lzyjxqt commented 3 months ago

建议修改为从github获取最新版本

!/bin/bash

设置 GitHub 仓库的 URL

REPO_URL="https://github.com/apernet/hysteria/releases"

使用 curl 获取最新版本的 release 信息

LATEST_RELEASE=$(curl -s $REPO_URL/latest | grep -o '"tag_name":.[^}],' | head -n 1 | sed 's/[^"]"//;s/",//')

构建最新版本的下载地址

DOWNLOAD_URL="https://github.com/apernet/hysteria/releases/download/$LATEST_RELEASE/hysteria-linux-amd64"

echo "Latest release version: $LATEST_RELEASE" echo "Download URL: $DOWNLOAD_URL"

seagullz4 commented 2 months ago

已经修改了,请看一下 https://github.com/seagullz4/hysteria2/commit/53c059296da33acc47a1169ea2087507ba538bce