Statement: The course is only for learning, and should not be used for any commercial purpose. If there is any violation, please email i#51it.wang (Replace # with @ when sending) Contact me to delete it, thank you.

Today, we are going to use Docker container to deploy Trojan, V2ray, Brook and SSR online at the same time. Novice can also get started and support Web side configuration.

Environmental preparation:

Operating system: CentOS7x64 bit
Memory: 512M+
The server recommends foreign tile movers, Vultr, Gugeyun, etc,
If you don't have a server, you can see the cost-effective foreign server I recommend: Click here to arrive directly

One domain name: You can download a foreign free domain name and recommend freenom free domain name
Use custom domain names A Record resolution to VPS public IP

Construction steps:

1. Connect to vps remotely through xshell, and execute the following command to install BBR plus acceleration:
wget " https://github.com/chiakge/Linux-NetSpeed/raw/master/tcp.sh " && chmod +x tcp.sh && ./tcp.sh

 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

input two Installing BBR plus acceleration , prompt to enter after the installation is completed "Y" Restarting the server takes effect

2. After restarting, execute the following command to start BBR plus acceleration:
./tcp.sh Enter numbers seven Enable BBR plus acceleration. If BBR plus is successfully started, it will be successful

-----On January 4, 2020, the trojan one button script will be updated, which is more convenient and fast-----
Execute commands directly curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_centos7.sh && chmod +x trojan_centos7.sh && ./ trojan_centos7.sh

Bind the domain name to VPS, and then execute the one click script above. There is no need to repeat more steps. After installation, download the generated client and run it!

---------The following methods are not recommended---------------
3. Install Docker container and Trojan using Big Brother's one click script: execute the following command
curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_install.sh && chmod +x trojan_install.sh && ./ trojan_install.sh

 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

Enter numbers one OK.

During the installation process, enter the domain name, key password, and Trojan password (the server is the same as the client) according to the prompts, and the password will be entered for 5 consecutive times

Process description:
 Enter the domain name bound to your VPS: * * Fill in the domain name you just resolved to the VPS here** ============================ Next, you need to set the password and enter it twice (set randomly, 5-10 digits) ============================ Generating RSA private key, 1024 bit long modulus ...................................................................................++++++ ...++++++ e is 65537 (0x10001) Enter pass phrase for private. key: * * Enter here for the first time, and it will not be displayed. Please note** Verifying - Enter pass phrase for private. key:** ============================ Next, you need to enter the password you just set ============================ Enter pass phrase for private. key: * * Enter here for the third time, and it will not be displayed. Please note** ============================ Enter the password you just set again ============================ Enter pass phrase for private. or. key: * * Enter here for the fourth time, and it will not be displayed. Please note** writing RSA key Signature ok subject=/C=US/ST=Mars/L=iTranswarp/O=iTranswarp/OU=iTranswarp/CN=xxx.xxx.xx Getting Private key ============================ Set the authentication password. The server and client use the same password ============================ Set password: * * Enter the last time here, and clear text will be displayed when entering**

Then press Enter to prompt successful startup
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

4. Download the certificate file of trojan to the local server /usr/src/trojan/private.crt Location.
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

5. Configure the trojan client and place the downloaded certificate in the same directory as the trojan client.
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

6. Modify the config.json Configuration file, modified to own server information
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

7. Running trojan can successfully access the Internet scientifically


8. Use Big Brother's one click script command to install Docker's UI management Portainer, and execute the following command:

 docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock \ --name ui --restart=always lihaixin/portainer:me

9. Enable 9000 on the VPS firewall, and use https://ip:9000 (Note that it is https, otherwise it cannot be opened), you can access the Docker's UI management interface. After entering, you can install other scientific online programs. For the first time, you need to set a password with a length of more than 8 digits. After entering, click create user
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

10. Click Create and the following figure will appear. We can select Local
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

11. Click on the left in turn containers We can see that the trojan we just built is running;
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

12. Click on the left in turn App Templates -- Brook Server , start building Brook;
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

13. Enter the name, click Advanced Selection, map the external network port and container port, and then click Deploy to complete the 3s
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

14. Then you can edit and set the password and rate of brook
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

After modification, it needs to be redeployed, which is very fast.

15. The same method can be used to deploy V2ray and SSR, which will not be demonstrated here. Please leave a message if there is any problem~~
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

16. The client connection method is Google's own. Brook, V2ry and SSR basically support the whole platform. Come on!
 [Fine] Use Docker container to deploy Trojan, V2ray, Brook and SSR at the same time to realize scientific Internet access

Attachment: Frequently asked questions

 1. Prompt: wget cannot be found. You can install wget first and execute yum - y install wget 2. After deployment, the dockerUI cannot be accessed. Please check whether the inbound port is open 3. Failed to deploy the agent. Please check whether the corresponding inbound port is open 4. Prompt that the certificate cannot be generated. Execute yum - y install ca certificates

Again, the tutorial is only for learning, and should not be used for any commercial purpose. If there is any violation, please email i#51it.wang (Replace # with @ when sending) Contact me to delete, thank you for any questions, please comment and feedback