Light weight auto proxy server
Project description
State
In active development. It's in experiment state now
Python AutoProxy
pyautoproxy
helps to configure your proxy for developemnt purpose.
When you work with some proxy and have to validate traffic quite often it really annoying to reconfigure a device to use proxy when needed and when not to.
To make life a bit easier we can use Proxy Auto-Config. But problem with it is that most of http clients expect it to be on some server and response from that server should have proper headers, hence we can't use just a file on local machine. Also Different devices require different proxy config time by time.
This app can solve the issue above. It's simple http server which now start serve on specified port and return correct Auto-Config
based on query parameters.
Usge
Install
pip install pyautoproxy
Run the server:
pyautoproxy --port 8081
For exanple, request to http://localhost:8081?host=localhost&port=8080 will return
function FindProxyForURL(url, host)
{
return "PROXY localhost:8080; DIRECT";
}
Which means that when proxy on localhost:8080
is available a client will try use it, but when you turn it off it will bypass proxy and use direct connections.
iOS simulator
iOS simulator requires configure your Mac OS to use the proxy, which really annoying. But when you start pyautoproxy
as
pyautoproxy -s
It will filter all requests except requests from iOS, hence all you machine traffic won't go through the proxy.
Configure for Android Emulator
From emulator you can always refer to host machine with ip 10.0.2.2
. Usual link for Auto-Proxy
config on Android will looks like http://10.0.2.2:8081/?host=10.0.2.2&port=8080
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyautoproxy-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd587ffae2dffdfb622f5c947bf52c557e952de9f1cdd04092b14027cc962168 |
|
MD5 | 5e0d697caac38ef24834b5d357db95a1 |
|
BLAKE2b-256 | 65a3040d6c82f137ec119bc8ac3ac1fc7703eeb12d5eb27305997dd6489aea6f |