<commit_before>squid_auth
==========

Service for IP based squid auth and session checking.

Squid 3.2+ config:
```
# Custom authenticator that always returns "OK" and links to the external acl
auth_param basic program <project_path>/clients/fake_auth_client.py
auth_param basic children 2
# ip_based_auth's dependence on %LOGIN is required for triggering authentication and, thus, setting %{Proxy-Authorization}.
external_acl_type ip_based_auth children-max=2 %SRC %{Proxy-Authorization} %LOGIN <project_path>/clients/auth_client.py 9999
acl verifiedUsers external ip_based_auth<commit_msg>Add installation instruction<commit_after>squid_auth
==========

Service for IP based squid auth and session checking.

How to install:
1. Copy repo (`git clone` or manually).
2. Install python.
3. Install pip.
4. `pip install -r requirements.txt`
5. Install squid 3.2+
6. Add squid config from this file.
7. `twistd squid_auth`
8. Profit.

Squid 3.2+ config:
```
# Custom authenticator that always returns "OK" and links to the external acl
auth_param basic program <project_path>/clients/fake_auth_client.py
auth_param basic children 2
# ip_based_auth's dependence on %LOGIN is required for triggering authentication and, thus, setting %{Proxy-Authorization}.
external_acl_type ip_based_auth children-max=2 %SRC %{Proxy-Authorization} %LOGIN <project_path>/clients/auth_client.py 9999
acl verifiedUsers external ip_based_auth
{'fraction_non_alphanumeric': 0.09026798307475317, 'fraction_numerical': 0.018335684062059238, 'mean_word_length': 5.855072463768116, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5116548', 'n_tokens_mistral': 441, 'n_tokens_neox': 415, 'n_words': 154}