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 su='su -'
alias npmc='npm --registry https://registry.npm.taobao.org' alias npmc='npm --registry https://registry.npm.taobao.org'
alias npmr='npm --silent run' 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" ] if [ "$(uname)" = "Darwin" ]
then then
alias l='ls -lG' alias l='ls -lG'

View File

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

View File

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