@@ -49,7 +49,7 @@ echo 'LISTEN_PORT = 4001' >> .env
49
49
50
50
#### Run shadowsocks-libev:
51
51
```
52
- ss-manager -m aes-256-cfb - u --manager-address /tmp/shadowsocks-manager.sock --fast-open
52
+ ss-manager -u --manager-address /tmp/shadowsocks-manager.sock --fast-open
53
53
```
54
54
55
55
#### Run shadowsocks-restful-api:
@@ -105,14 +105,36 @@ Response example:
105
105
| Request method: | POST |
106
106
| Request URL: | https://host_name:port/ |
107
107
| Request Header: | Content-Type: application/json <br > Authorization: Bearer your_authentication_toke |
108
- | Request Body: | {"port": port_number, "password":"port_password"} |
108
+ | Request Body: | {"port": port_number, "password": "port_password", "method": "encryption_method "} |
109
109
| Response HTTP Status Code: | 201 Created |
110
110
| Response Error Status Code: | 401 Unauthorized <br > 409 (port already exists from shadowsocks) <br > 410 (port not available from operating system) <br > 422 (shadowsocks failed adding port) <br > 427 (operating system failed adding port) 424 (shadowsocks unreachable) <br > 425 (shadowsocks no response) <br > 500 Internal Server Error |
111
111
112
112
Request example (curl):
113
113
```
114
- curl -ik -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1Mjk0ODg0MTcsImV4cCI6MTUyOTU3NDgxN30.9wdDV4hXvHdCkWhcOFpW2YXvSL6WupWSj2kTI6XMhFk" -X POST -d '{"port": 50000,"password":"2owkq9wu2elwst7"}' https://localhost:4001/
115
- ```
114
+ curl -ik -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1Mjk0ODg0MTcsImV4cCI6MTUyOTU3NDgxN30.9wdDV4hXvHdCkWhcOFpW2YXvSL6WupWSj2kTI6XMhFk" -X POST -d '{"port": 50000,"password":"2owkq9wu2elwst7","method":"chacha20-ietf-poly1305"}' https://localhost:4001/
115
+ ```
116
+
117
+ Supported encryption methods are:
118
+ * ` aes-128-gcm `
119
+ * ` aes-192-gcm `
120
+ * ` aes-256-gcm `
121
+ * ` aes-128-cfb `
122
+ * ` aes-192-cfb `
123
+ * ` aes-256-cfb `
124
+ * ` aes-128-ctr `
125
+ * ` aes-192-ctr `
126
+ * ` aes-256-ctr `
127
+ * ` camellia-128-cfb `
128
+ * ` camellia-192-cfb `
129
+ * ` camellia-256-cfb `
130
+ * ` bf-cfb `
131
+ * ` chacha20-ietf-poly1305 `
132
+ * ` xchacha20-ietf-poly1305 `
133
+ * ` salsa20 `
134
+ * ` chacha20 `
135
+ * ` chacha20-ietf `
136
+
137
+ If the ` method ` field is not supplied, the default method is ` aes-256-cfb ` .
116
138
117
139
#### Delete a port
118
140
| | |
@@ -135,7 +157,7 @@ curl -ik -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQi
135
157
| Request URL: | https://host_name:port/all |
136
158
| Request Header: | Authorization: Bearer your_authentication_toke |
137
159
| Response HTTP Status Code: | 200 OK |
138
- | Response Body: | [ {"port": port_number , "password":"port_password"}, ... ] |
160
+ | Response Body: | [ {"port": port_number , "password":"port_password","method":"encryption_method" }, ... ] |
139
161
| Response Error Status Code: | 401 Unauthorized <br >424 (shadowsocks unreachable) <br > 425 (shadowsocks no response) <br > 500 Internal Server Error |
140
162
141
163
Request example (curl):
@@ -144,7 +166,7 @@ curl -ik -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQi
144
166
```
145
167
Response example:
146
168
``` json
147
- [{"port" : 50000 ,"password" :" 2owkq9wu2elwst7" }, {"port" : 50001 ,"password" :" dowl3829j3suniw6" }]
169
+ [{"port" : 50000 ,"password" :" 2owkq9wu2elwst7" , "method" : " chacha20-ietf-poly1305 " }, {"port" : 50001 ,"password" :" dowl3829j3suniw6" , "method" : " aes-256-cfb " }]
148
170
```
149
171
150
172
#### Get traffic for all ports
0 commit comments