add proxy

This commit is contained in:
2024-04-05 11:08:58 +08:00
parent 08926733d6
commit d97b93cf96
3 changed files with 45 additions and 37 deletions

View File

@@ -8,6 +8,10 @@ blue() { echo -e "\033[34m\033[01m[MESSAGE] $1\033[0m"; }
light_magenta() { echo -e "\033[95m\033[01m[NOTICE] $1\033[0m"; }
light_yellow() { echo -e "\033[93m\033[01m[NOTICE] $1\033[0m"; }
proxy=""
if [ $# -gt 0 ]; then
proxy="https://mirror.ghproxy.com/"
fi
# 获取路由器型号信息
get_router_name() {
cat /tmp/sysinfo/model
@@ -33,7 +37,7 @@ install_depends_apps() {
# 备份 /etc/opkg/distfeeds.conf
cp /etc/opkg/distfeeds.conf /etc/opkg/distfeeds.conf.backup
# 先替换为 mt3000 的软件源来安装 lsblk 和 fdisk 工具
mt3000_opkg="https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/mt-3000/distfeeds.conf"
mt3000_opkg="${proxy}https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/mt-3000/distfeeds.conf"
wget -O /etc/opkg/distfeeds.conf ${mt3000_opkg}
green "正在更新为 mt3000 的软件源"
cat /etc/opkg/distfeeds.conf