The script searches for a suitable proxy from the proxy list and creates a pac file for firefox.
At startup, checks the availability of the site through the saved proxy in the json file, if the site is not available, then a search is performed, and if json is found, the file is updated.
by default, proxy sheets are taken from the service http://api.foxtools.ru/v2/Help/Proxy
- -u url: proxy service - sites whis api for get proxy lists, default http://api.foxtools.ru/v2/Proxy
- -c config: path to cache file - keep configurations domains and used proxy server, format json, default .cache.json
- -p packfile: path to pac file for firefox, default ./proxy.pac
- -t template: path to template file for pac, default ./proxy.pac.j2
- -v verbose: 0-5 verbose level output, default 0
{"https://www.domain.com": {"ip": "127.0.0.1", "port": "8080"}}
Be sure to specify 3rd level domains
pip install -r requirements.txt --upgrade
- Via cron:
30 */3 * * * python /home/user/git/proxylist/create_proxy_firefox.py --template /home/user/git/proxylist/proxy.pac.j2 --config /home/user/git/proxylist/.cache.json --pac /home/user/.proxy.pac
- Manually:
python /home/user/git/proxylist/create_proxy_firefox.py --template /home/user/git/proxylist/proxy.pac.j2 --config /home/user/git/proxylist/.cache.json --verbose 5 --pac /home/user/.proxy.pac