A simple (pure bash script) command line installer and controller for v2ray-core.
Note: Default config is Chinese area improved for solving the problem causing by Chinese Great Firewall. You should modify it by yourself if you dont live in China.
-
Install
git clone git@github.com:jinmiaoluo/v2ray-core-helper.git ~/.proxy
-
Setup
If you use bash shell
echo 'export PATH="$PATH:$HOME/.proxy"' >> ~/.bash_profile
[option] If you use zsh shell
echo 'export PATH="$PATH:$HOME/.proxy"' >> ~/.zshrc
-
Setup property permission
sudo sh -c 'echo "%admin ALL = (ALL) NOPASSWD:/usr/sbin/networksetup" >> /etc/sudoers'
-
import shell config
If you use bash shell
source ~/.bash_profile
[option] If you use zsh shell
source ~/.zshrc
-
Add your outbounds
Add your outbounds settings into config.json
-
Download dependency
proxy init
-
Start your proxy
proxy start
Done! You can visit google now. Open Safari and try it yourself.
-
[option] Setup terminal proxy
If you use bash shell
echo -e "export http_proxy='http://127.0.0.1:9090'\nexport https_proxy='http://127.0.0.1:9090'" >> ~/.bash_profile && source ~/.bash_profile
[option] If you use zsh shell
echo -e "export http_proxy='http://127.0.0.1:9090'\nexport https_proxy='http://127.0.0.1:9090'" >> ~/.zshrc && source ~/.zshrc
-
[option] Temporarily disable terminal proxy
unset http_proxy && unset https_proxy
-
[option] Persistently disable terminal proxy
delete the follow lines in your
.bash_profile
or.zshrc
export http_proxy='http://127.0.0.1:9090' export https_proxy='http://127.0.0.1:9090'
-
[option] Figure out more usage
proxy help