diff --git a/nixhome/.bashrc b/nixhome/.bashrc index 73b2587..0f09e94 100644 --- a/nixhome/.bashrc +++ b/nixhome/.bashrc @@ -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' diff --git a/nixhome/seafile-ignore.txt b/nixhome/seafile-ignore.txt index dab13bd..f46afc1 100644 --- a/nixhome/seafile-ignore.txt +++ b/nixhome/seafile-ignore.txt @@ -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 diff --git a/proxy.sh b/proxy.sh index f0ac8ea..7462554 100755 --- a/proxy.sh +++ b/proxy.sh @@ -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 " "