13 lines
570 B
Plaintext
13 lines
570 B
Plaintext
echo "=> Mihomo proxy functions activated"
|
|
function setproxy() {
|
|
local host=${1:-127.0.0.1} # 更改IP为您的代理软件监听IP, 默认127.0.0.1
|
|
local port=${2:-7890} # 更改端口为您的代理软件监听端口, 默认7890
|
|
export http_proxy=http://$host:$port && export https_proxy=$http_proxy
|
|
export no_proxy=localhost,127.0.0.1,::1,.localdomain
|
|
echo "- You've set the network proxy! Info: $http_proxy"
|
|
}
|
|
function unsetproxy() {
|
|
unset http_proxy && unset https_proxy && unset no_proxy
|
|
echo "- You've unset the network proxy!"
|
|
}
|