基于Tornado的HTTP(S)代理服务器,在一个文件中!
pyprox的Python项目详细描述
用法:pyproxy[options]
```
用法:绑定调试器绑定到的地址(默认
127.0.0.1)
--配置配置文件
--调试模式(默认为false)
--帮助显示此帮助信息
--用户名代理用户名
--密码代理密码
--端口调试器侦听的端口(默认值
8888)
````
api
==
1用作http/httpsproxy
`curl-x http://localhost:8888/http://httpbin.org/get`
`curl http://localhost:8888/anypath?method=post&url=http://httpbin.org/post`
3个带json的传递参数(也可以使用get参数)
`curl-d'{“url”:“http://httpbin.org/get”,“method”:“get”,“headers”:{“用户代理”:“baidu”}“http://localhost:8888/?callback=callback`
auth
====
1 http proxy auth
`curl-x http://username:password@localhost:8888/http://httpbin.org/get`
<2 http basic auth
`curl http://username:password@localhost:8888/anypath?method=post&url=http://httpbin.org/post`
3 get/post parameters/json中的用户名和密码
`curl http://localhost:8888/anypath?method=post&;url=http://httpbin.org/post&;username=usernmae&;password=password`
4主机签名/path签名/url签名
url=http://httpbin.org/get to get sign
url=http://httpbin.org/get&;path\u sign=abc123`
```
用法:绑定调试器绑定到的地址(默认
127.0.0.1)
--配置配置文件
--调试模式(默认为false)
--帮助显示此帮助信息
--用户名代理用户名
--密码代理密码
--端口调试器侦听的端口(默认值
8888)
````
api
==
1用作http/httpsproxy
`curl-x http://localhost:8888/http://httpbin.org/get`
`curl http://localhost:8888/anypath?method=post&url=http://httpbin.org/post`
3个带json的传递参数(也可以使用get参数)
`curl-d'{“url”:“http://httpbin.org/get”,“method”:“get”,“headers”:{“用户代理”:“baidu”}“http://localhost:8888/?callback=callback`
auth
====
1 http proxy auth
`curl-x http://username:password@localhost:8888/http://httpbin.org/get`
<2 http basic auth
`curl http://username:password@localhost:8888/anypath?method=post&url=http://httpbin.org/post`
3 get/post parameters/json中的用户名和密码
`curl http://localhost:8888/anypath?method=post&;url=http://httpbin.org/post&;username=usernmae&;password=password`
4主机签名/path签名/url签名
url=http://httpbin.org/get to get sign
url=http://httpbin.org/get&;path\u sign=abc123`