improvement
This commit is contained in:
35
bashrc.sh
Normal file
35
bashrc.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
_XRAY_DIR="/home/dreagonmon/scripts/v2xray"
|
||||
|
||||
# proxy
|
||||
httpproxy-server () {
|
||||
eval $(ps -ef | grep -m 1 "python .*xray_run\.py a" | awk '{print "sudo kill "$2}')
|
||||
sudo nohup python ${_XRAY_DIR}/xray_run.py a >> /dev/null 2>&1 &
|
||||
}
|
||||
|
||||
getip () {
|
||||
curl https://ip.gs
|
||||
}
|
||||
|
||||
allproxy () {
|
||||
export ALL_PROXY="socks5://127.0.0.1:1080"
|
||||
export all_proxy="socks5://127.0.0.1:1080"
|
||||
}
|
||||
|
||||
httpproxy () {
|
||||
export HTTP_PROXY="http://127.0.0.1:2802"
|
||||
export http_proxy="http://127.0.0.1:2802"
|
||||
export HTTPS_PROXY="http://127.0.0.1:2802"
|
||||
export https_proxy="http://127.0.0.1:2802"
|
||||
export FTP_PROXY="http://127.0.0.1:2802"
|
||||
export ftp_proxy="http://127.0.0.1:2802"
|
||||
}
|
||||
|
||||
nohttpproxy () {
|
||||
unset HTTP_PROXY
|
||||
unset http_proxy
|
||||
unset HTTPS_PROXY
|
||||
unset https_proxy
|
||||
unset FTP_PROXY
|
||||
unset ftp_proxy
|
||||
}
|
||||
Reference in New Issue
Block a user