Use AWS EC2 create VPN(SSR)(Chinese and English description)
Tags: aws, ec2, vpn, ssr
Published: 2021-08-25 02:56:31

Hi,guys,Today I will show you how to use aws ec2 to create ShadowsocksR


# First,You should launch a server by aws ec2

### 1.Launch a ec2 server
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/amf0cnmtq66tr1vcz2e8.png)

### 2.Choose what you want instance type
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/etmkbz76ydjjwpxzpaez.png)

### 3.Open the instance security group ports,such as 22
(Notice:When the shadowsocksr is deployed later, the corresponding port will be opened)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gs2vzchfv1aitlix4o9q.png)
 
### 4.Connect to you create ec2-instance
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rru0k4jyot79m6r0gynb.png)
 
# Second,Install ShadowsocksR Script

### 1.Login root user
`[ec2-user@ip-172-31-95-56 ~]$ sudo -i`
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0lx27zejpu7re6zeinj2.png)
 
### 2.git and run ShadowsocksR script
`wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ssr.sh && chmod +x ssr.sh && bash ssr.sh
`
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0q73tysmpe8s8fame5j0.png)

### Congiure the ShadowSocksR config
##### 1.First you will see this
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/52asmog58yjxgnojfq1j.png)
### You need type the number `1` to install ShadowSocksR
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/99sq7928w0jr8wko1qvl.png)

### 2.Choose the ShadowSocksR server port,and you need open the ec2 security group inbound port
(default: 2333)

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v78c2zvkqj3sh66bxrff.png)
 
 
### 3.Set the shadowsocksR server connect password
(Default: doub.io)

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z4cn8qcmhndwp5pn5oi4.png)
 
### 4.Choose the Encryption Mode
[Note] if auth is used_ chain_ A protocol, please select none as the encryption method, and confusion is optional (recommended)
[Note] the salsa20 / chachacha20 - * series encryption method requires additional installation (depends on libsodium, otherwise shadowsocksr cannot be started!)
(Default: 5. aes-128-ctr)

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2otjdlxbupoxmeo01cp5.png)
 
### 5.Choose Protocol plug-in
[Note] if auth is used_ chain_ A protocol, please select none as the encryption method, and confusion is optional (recommended)

(Default: 2. auth_sha1_v4)

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wek57nn9zotqy562j52y.png)
 
### 6.Choose Confusion plug-in
 [note] if you use shadowsocksr to accelerate the game, please select obfuscation compatible with the original or plain obfuscation, and then the client selects plain, otherwise the delay will be increased!
In addition, if you select tls1.2_ ticket_ Auth, then the client can choose tls1.2_ ticket_ Fastauth, so you can disguise without adding delay!
If you are building in popular areas such as Japan and the United States, you may have a lower chance of being blocked by the wall!

(Default: 1. plain)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/arsqrp3tkmkrvcg9g362.png)
 
### 7.Set Connect client numbers,Single thread speed,Single port total speed
Please enter the number of devices (auth) to be limited by the shadowsocksr account to be set_* Series protocols are incompatible (only the original version is valid)
[Note] device number limit: the number of clients that can be linked at the same time on each port (multi port mode, each port is calculated independently). It is recommended that there be at least 2.
(Default: No-limit)

Please enter the upper limit of single thread speed limit per port to be set (unit: KB / s)
[note] single thread speed limit: the upper limit of single thread speed limit on each port, and multithreading is invalid.
(Default: No-limit)

Please enter the upper limit of the total speed limit of each port to be set (unit: KB / s)
[note] total speed limit of ports: the upper limit of total speed limit of each port, and the overall speed limit of a single port.
(Default: No-limit)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28wp39wo4g8n6lewzh4r.png)
 
### 8.Well done,You can see this ,which means you already install and run the shadowsocksR server,And you can use SSR-client to connect
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2dnan6aq51fhnkln9eq.png)