101对双生儿's Blog

Not pleased by external gains. Not saddened by personal losses.

0%

Setting Up V2Ray and Brook Proxy Servers

Last time I talked about setting up a ShadowsocksR proxy server. However, ShadowsocksR is not as stable as it was, but thanks to the talented people, we have the alternatives: V2Ray and Brook.

Server-side Setup

Prepare a server

This part is almost the same as that in the previous article, but this time, I will deploy a Vultr Cloud Compute (VC2) server with Debian 10.

Check out my referral links if you want free credits for trying virtual private servers (VPS)!

Here is a reminder: I don’t recommend enabling IPv6 when setting up the server, as it might cause unexpected connection issue later.

Install V2Ray Proxy Server

Similar to deploying a ShadowsocksR proxy server, there are already plenty of one-click scripts that take care of everything about the installation for us. Here we will use the script developed by 233boy. First, make sure that you have curl installed. Then download and run the script by typing bash <(curl -s -L https://git.io/v2ray.sh).

Enter 1 to start the installation of V2Ray proxy server.

Use the default setting (i.e. hit Enter) for the transport. You can find more information about transport here.

Choose a non-conflicting port number, and use the default setting for ads blocking option.

Now we have the opportunity to set up a Shadowsocks proxy server at the same time. Even though Shadowsocks protocol is pretty unstable nowadays, there’s no harm for us to add this “backup” option. So hit Y to continue setting up Shadowsocks, choose another port number and a password, and use the default setting for the encryption method. If everything is good, hit Enter and the script will do all the dirty work then.

Finally, You will see all the configuration detail as shown below.

In order to set up the V2Ray client easily, we need the VMess URL for our V2Ray proxy server. Therefore, type v2ray url to retrieve that URL and write it down.

Similar to the ShadowsocksR script, we can use this V2Ray script to manage our V2Ray proxy server settings by typing v2ray.

A useful operation here is to set up a separate proxy for Telegram. Choose 6, enter Y, then pick another port number. If everything is good, hit Enter.

And later we can use the link below to set up the proxy for Telegram.

Install Brook Proxy Server

We will still use the one-click script developed by Toyo. First, make sure that you have wget installed. Then download and run the script by typing wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/brook.sh && chmod +x brook.sh && bash brook.sh.

Enter 1 to start the installation of Brook proxy server. Choose a non-conflicting port number and a password, and use the default settings for Brook protocol and version.

Finally, you will see the Brook configuration detail as shown below.

Again, we can use this Brook script to manage our Brook proxy server settings by typing ./brook.sh.

Different from V2Ray, a Brook proxy seems to accept only one client at a time. Therefore, we probably want multiple users for multiple devices. To add a user, choose 7 in the management script and then choose 1, and follow the exact same instructions above.

You will see that there are two users now. Repeat those steps to set up additional users if necessary.

Last, don’t forget to set firewall rules for the server!

Client-side Setup

Set up V2Ray Client

I would recommend the following clients:

After launching the client, we can import the VMess URL into it.

Set up Brook Client

Brook provides native GUI clients.

  • macOS
    • Install with Homebrew Cask: brew cask install brook
  • iOS: App Store

Set up MTPROTO Proxy in Telegram

Just visit the link in any web browser and finish setting up in Telegram.

References

  1. 233boy, “V2Ray一键安装脚本,” GitHub. [Online]. Available: https://github.com/233boy/v2ray/wiki/V2Ray一键安装脚本.
  2. Toyo, “『原创』一个优秀的跨平台 Socks5代理软件 —— Brook 一键安装管理脚本,” 逗比根据地. [Online]. Available: https://toyodadoubi.github.io/aybh4ww5-2.html.