Skip to content

Instantly share code, notes, and snippets.

View KnowSky404's full-sized avatar
😞
I once felt so sad that I couldn't control myself.

不见晓空 KnowSky404

😞
I once felt so sad that I couldn't control myself.
View GitHub Profile
@KnowSky404
KnowSky404 / .zshrc
Created September 2, 2025 02:33
LinuxSetProxy
setproxy() {
local proxy="http://127.0.0.1:20171"
for v in http_proxy https_proxy all_proxy HTTP_PROXY HTTPS_PROXY ALL_PROXY; do
export $v="$proxy"
done
echo "Proxy set to $proxy"
# auto check proxy
if curl -s --connect-timeout 5 -I https://www.google.com --proxy $proxy | grep "200" >/dev/null; then
echo "✅ Proxy is working (Google reachable)"