mirror of
https://github.com/bin456789/reinstall.git
synced 2025-06-21 11:49:58 +00:00
更改代理
This commit is contained in:
parent
ef16d20a44
commit
c2aaa967c1
@ -3,7 +3,7 @@ mode con cp select=437 >nul
|
|||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
set confhome=https://raw.githubusercontent.com/bin456789/reinstall/main
|
set confhome=https://raw.githubusercontent.com/bin456789/reinstall/main
|
||||||
set github_proxy=raw.gitmirror.com
|
set github_proxy=https://mirror.ghproxy.com/https://raw.githubusercontent.com
|
||||||
|
|
||||||
rem 65001 代码页会乱码
|
rem 65001 代码页会乱码
|
||||||
|
|
||||||
@ -43,8 +43,8 @@ if not errorlevel 1 (
|
|||||||
if defined github_proxy (
|
if defined github_proxy (
|
||||||
echo !confhome! | findstr /c:"://raw.githubusercontent.com/" >nul
|
echo !confhome! | findstr /c:"://raw.githubusercontent.com/" >nul
|
||||||
if not errorlevel 1 (
|
if not errorlevel 1 (
|
||||||
rem set confhome=!github_proxy!/!confhome!
|
set confhome=!confhome:http://=https://!
|
||||||
set confhome=!confhome:raw.githubusercontent.com=%github_proxy%!
|
set confhome=!confhome:https://raw.githubusercontent.com=%github_proxy%!
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
set -eE
|
set -eE
|
||||||
confhome=https://raw.githubusercontent.com/bin456789/reinstall/main
|
confhome=https://raw.githubusercontent.com/bin456789/reinstall/main
|
||||||
github_proxy=raw.gitmirror.com
|
github_proxy=https://mirror.ghproxy.com/https://raw.githubusercontent.com
|
||||||
|
|
||||||
# https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
|
# https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
@ -2089,8 +2089,8 @@ esac
|
|||||||
# jsdelivr 有12小时缓存
|
# jsdelivr 有12小时缓存
|
||||||
# https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js#L31
|
# https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js#L31
|
||||||
if [ -n "$github_proxy" ] && [[ "$confhome" = http*://raw.githubusercontent.com/* ]] && is_in_china; then
|
if [ -n "$github_proxy" ] && [[ "$confhome" = http*://raw.githubusercontent.com/* ]] && is_in_china; then
|
||||||
# confhome=$github_proxy/$confhome
|
confhome=${confhome/http:\/\//https:\/\/}
|
||||||
confhome=${confhome/raw.githubusercontent.com/$github_proxy}
|
confhome=${confhome/https:\/\/raw.githubusercontent.com/$github_proxy}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 以下目标系统不需要两步安装
|
# 以下目标系统不需要两步安装
|
||||||
|
Loading…
x
Reference in New Issue
Block a user