This commit is contained in:
guox191
2019-03-25 23:53:47 +08:00
parent 67151c071b
commit 15d7ed48bf
4 changed files with 34 additions and 26 deletions

View File

@@ -528,8 +528,8 @@ module.exports = {
anyproxy --rule rule_sample/sample_use_local_response.js
```
```js
/*
sample:
/*
sample:
intercept all requests toward httpbin.org, use a local response
test:
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
@@ -558,8 +558,8 @@ module.exports = {
anyproxy --rule rule_sample/sample_modify_request_header.js
```
```js
/*
sample:
/*
sample:
modify the user-agent in requests toward httpbin.org
test:
curl http://httpbin.org/user-agent --proxy http://127.0.0.1:8001
@@ -647,8 +647,8 @@ module.exports = {
anyproxy --rule rule_sample/sample_modify_request_protocol.js
```
```js
/*
sample:
/*
sample:
redirect all http requests of httpbin.org to https
test:
curl 'http://httpbin.org/get?show_env=1' --proxy http://127.0.0.1:8001
@@ -677,8 +677,8 @@ module.exports = {
anyproxy --rule rule_sample/sample_modify_response_statuscode.js
```
```js
/*
sample:
/*
sample:
modify all status code of http://httpbin.org/ to 404
test:
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
@@ -706,8 +706,8 @@ module.exports = {
anyproxy --rule rule_sample/sample_modify_response_header.js
```
```js
/*
sample:
/*
sample:
modify response header of http://httpbin.org/user-agent
test:
curl -I 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
@@ -735,8 +735,8 @@ module.exports = {
anyproxy --rule rule_sample/sample_modify_response_data.js
```
```js
/*
sample:
/*
sample:
modify response data of http://httpbin.org/user-agent
test:
curl 'http://httpbin.org/user-agent' --proxy http://127.0.0.1:8001
@@ -809,6 +809,8 @@ install
* Besides installing root CA, you have to "turn on" the certificate for web manually in *settings - general - about - Certificate Trust Settings*. Otherwire, safari will not trust the root CA generated by AnyProxy.
<img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" />
### trust root CA in Android
First of all, you need to download the root CA by clicking *Root CA* in web ui, and then scan the QR code.
Installing CA in Android could be different based on the system, we list some common steps as below, but you can find the right way in you system with similar menu path.
@@ -818,7 +820,7 @@ Installing CA in Android could be different based on the system, we list some co
* Settings -> Security & Location > Encryption & credentials -> Install from storage, and find your CA file to install
* Settings -> Security -> Install from SD card, and find you CA file to install
<img src="https://zos.alipayobjects.com/rmsportal/hVWkXHrzHmOKOtCKGUWx.png" width="500" />
As we konw, there are several file extensions of CA file which may not recognised by all kinds of Android OS. The .crt file is the most popular, and a few systems only support .cer file such as OPPO R15. In AnyProxy, you can choose what type of file you need before installing the root CA to your devices.
### config iOS/Android proxy server