diff --git a/README.md b/README.md index 049150d..13729cf 100755 --- a/README.md +++ b/README.md @@ -9,6 +9,15 @@ This repo contains: 3. PAC-scripts performance analyses of scripts generated 4. Based on the research of step 3 [the final PAC-generator](https://script.google.com/d/1bJhqyXlYem9cyVQwo02EfpsWWg8Ns20FuT4jP7sL_AkS1K_SBgm-V6fH/edit?usp=sharing) was written as a Google App Script in JavaScript which is triggered every two hours to generate and publish [PAC-script on Google Drive](https://drive.google.com/open?id=0B-ZCVSvuNWf0akpCOURNS2VCTmc) ([direct link](https://drive.google.com/uc?export=download&id=0B-ZCVSvuNWf0akpCOURNS2VCTmc)). +## How it Works + +0. PAC script is a JavaScrip file, triggered on every URL request, which says browser which proxy to use if any for this URL. +1. The Chrome Extension sets PAC script in browser settings and keeps it synced with PAC script on the server (one on Google Drive, Antizapret or on Anticenz). +2. On every request PAC script checks if host is blocked OR if it's IP is blocked using `switch(..) {..}` somewhat-trie-like structure (Google Drive PAC script). +Antizapret PAC script checks for IPs only. +Anticenz PAC script checks for hosts and IPs with `indexOf`, but lacks some IPs. +3. If address is blocked PAC script returns proxy server to the browser: Antizapret, or Anticenz if the first one fails. +4. PAC scripts on servers are updated periodically from https://github.com/zapret-info/z-i ## Why I do This