This commit is contained in:
Luk 2024-01-14 12:26:29 +08:00
parent 08ad3d0bac
commit d016571ff5
3 changed files with 16 additions and 17 deletions

View File

@ -47,6 +47,7 @@ alias egrep='egrep --color=auto'
alias su='su -'
alias npmc='npm --registry https://registry.npm.taobao.org'
alias npmr='npm --silent run'
alias curlw='curl -sSL -w "%{url_effective}\n --- %{http_code} | %{time_total} s | %{size_download} bytes\n\n"'
if [ "$(uname)" = "Darwin" ]
then
alias l='ls -lG'

View File

@ -45,14 +45,8 @@ pages4loader.json5
*/.deploy_git/
# HBuilder 目录
unpackage/cache/
unpackage/debug/
unpackage/dist/
unpackage/resources/
*/unpackage/cache/
*/unpackage/debug/
*/unpackage/dist/
*/unpackage/resources/
unpackage/
*/unpackage/
Icon
OneDrive/Icon

View File

@ -1,16 +1,19 @@
#!/bin/bash
function proxy(){
echo "=== 开启或关闭网络代理? s for start, t for terminate, anything else for no change."
if [ -n "$1" ]; then
proxySwitch="$1"
else
echo "=== 开启或关闭网络代理? s or 1 for start, t or 0 for terminate, anything else for no change."
read -p ">>> " proxySwitch
if [ $proxySwitch ] && [ $proxySwitch == "s" ]
then
fi
# function proxy() {
if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then
export all_proxy=socks5://127.0.0.1:1086
export http_proxy=socks5://127.0.0.1:1086
export https_proxy=socks5://127.0.0.1:1086
echo -e "--- 已开启网络代理"
elif [ $proxySwitch ] && [ $proxySwitch == "t" ]
then
elif [ "$proxySwitch" == "t" ] || [ "$proxySwitch" == "0" ]; then
unset all_proxy
unset http_proxy
unset https_proxy
@ -18,8 +21,9 @@ function proxy(){
else
echo "--- Nothing changed."
fi
}
proxy
echo 测试 ip.gs, ip.sb, ipinfo.io
# }
echo all_proxy="$all_proxy"
# ip.gs, ip.sb, ipinfo.io
curl ipinfo.io
echo " "