mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
core: 更改 github 代理
This commit is contained in:
parent
5327fe2e20
commit
11784f13cc
@ -29,7 +29,7 @@ curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
|
|||||||
### 下载 (国内)
|
### 下载 (国内)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -O https://ghps.cc/https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh
|
curl -O https://raw.fgit.cf/bin456789/reinstall/main/reinstall.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 用法 1: 安装 Linux
|
### 用法 1: 安装 Linux
|
||||||
@ -135,7 +135,7 @@ certutil -urlcache -f -split https://raw.githubusercontent.com/bin456789/reinsta
|
|||||||
### 下载(国内)
|
### 下载(国内)
|
||||||
|
|
||||||
```batch
|
```batch
|
||||||
certutil -urlcache -f -split https://ghps.cc/https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.bat
|
certutil -urlcache -f -split https://raw.fgit.cf/bin456789/reinstall/main/reinstall.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
### 如果无法下载
|
### 如果无法下载
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@echo off
|
@echo off
|
||||||
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=https://ghps.cc
|
set github_proxy=raw.fgit.cf
|
||||||
|
|
||||||
:: Windows 7 SP1 winhttp 默认不支持 tls 1.2
|
:: Windows 7 SP1 winhttp 默认不支持 tls 1.2
|
||||||
:: https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392
|
:: https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392
|
||||||
@ -35,7 +35,8 @@ if !errorlevel! == 0 (
|
|||||||
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 !errorlevel! == 0 (
|
if !errorlevel! == 0 (
|
||||||
set confhome=!github_proxy!/!confhome!
|
rem set confhome=!github_proxy!/!confhome!
|
||||||
|
set confhome=!confhome: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=https://ghps.cc
|
github_proxy=raw.fgit.cf
|
||||||
|
|
||||||
this_script=$(realpath "$0")
|
this_script=$(realpath "$0")
|
||||||
trap 'trap_err $LINENO $?' ERR
|
trap 'trap_err $LINENO $?' ERR
|
||||||
@ -1338,7 +1338,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=$github_proxy/$confhome
|
||||||
|
confhome=${confhome/raw.githubusercontent.com/$github_proxy}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 以下目标系统不需要两步安装
|
# 以下目标系统不需要两步安装
|
||||||
|
Loading…
x
Reference in New Issue
Block a user