|
|
1 год назад | |
|---|---|---|
| .idea | 1 год назад | |
| assets | 1 год назад | |
| database | 1 год назад | |
| parsers | 1 год назад | |
| services | 1 год назад | |
| static | 1 год назад | |
| templates | 1 год назад | |
| tests | 1 год назад | |
| utils | 1 год назад | |
| .gitignore | 1 год назад | |
| CHANGELOG.md | 1 год назад | |
| IMPROVEMENTS_SUMMARY.md | 1 год назад | |
| LICENSE | 1 год назад | |
| README.md | 1 год назад | |
| README_es.md | 1 год назад | |
| app.py | 1 год назад | |
| install.sh | 1 год назад | |
| requirements.txt | 1 год назад |

Edit the .env file to configure blocked domains:
BLACKLIST_DOMAINS="facebook.com,twitter.com,instagram.com,tiktok.com,youtube.com,netflix.com"
# Reconfigure blacklist interactively
sudo ./install.sh --configure-blacklist
# Restart service after manual changes
sudo systemctl restart squidstats.service
# View current configuration
grep BLACKLIST_DOMAINS /opt/squidstats/.env
The entire installation process in more detail can be found here.
squidclient installed on the server
apt install git python3 python3-pip python3-venv python3-pymysql libmariadb-dev curl
⚠️ !!Important ⚠️ For compatibility with user logs, use this format in /etc/squid/squid.conf:
logformat detailed \
"%ts.%03tu %>a %ui %un [%tl] \"%rm %ru HTTP/%rv\" %>Hs %<st %rm %ru %>a %mt %<a %<rm %Ss/%Sh %<st
access_log /var/log/squid/access.log detailed
🎉 New in v2.1.0: Enhanced installer with blacklist configuration and multiple options!
Get Script with curl or wget:
wget https://github.com/kaelthasmanu/SquidStats/releases/download/v2.1.0/install.sh
# or
curl -O https://raw.githubusercontent.com/kaelthasmanu/SquidStats/main/install.sh
Add execution permission:
sudo chmod +x install.sh
Execute the script:
sudo ./install.sh
The installer now supports multiple modes:
# Full installation (interactive)
sudo ./install.sh
# Update existing installation
sudo ./install.sh --update
# Configure blacklist only
sudo ./install.sh --configure-blacklist
# Show help
./install.sh --help
During installation, you can configure which domains notify like block:
Example custom configuration:
# When prompted, enter domains separated by commas:
facebook.com,twitter.com,youtube.com,netflix.com,tiktok.com
Clone the repository:
mkdir -p /opt/squidstats
git clone https://github.com/kaelthasmanu/SquidStats.git /opt/squidstats
Creating a virtual environment (venv):
cd /opt/squidstats/
python3 -m venv "/opt/squidstats/venv"
source venv/bin/activate
pip install --upgrade pip
Install requeriments python with pip or pip3:
pip install -r /opt/squidstats/requirements.txt
Create a .env file in the project root and add the following content:\ Note: for use MARIADB need your own database running
VERSION=2
SQUID_HOST="127.0.0.1"
SQUID_PORT=3128
FLASK_DEBUG="True"
DATABASE_TYPE="SQLITE"
SQUID_LOG="/var/log/squid/access.log"
DATABASE_STRING_CONNECTION="/opt/squidstats/"
REFRESH_INTERVAL=60
BLACKLIST_DOMAINS="facebook.com,twitter.com,instagram.com,tiktok.com,youtube.com,netflix.com"
Run App with python or python3 🚀:
python3 app.py
With your preferred browser, visit the installation URL:
http://ip/hostname:5000
Warning: 🚨 The first execution may cause high CPU usage.
Get Script With curl o wget:
wget https://github.com/kaelthasmanu/SquidStats/releases/download/0.2/install.sh
Add permission execution:
sudo chmod +x install.sh
Execute the script with parameters update:
sudo ./install.sh --update
🕒 Run on System Startup To ensure the application starts automatically when the system boots, add the following cron job:
Open with a editor the file crontab
nano /etc/crontab
Add the following line to the crontab file(change path_app for your path):
@reboot root nohup python3 path_app/app.py &
Save
Or can use service(daemon):
Copy file service:
cp ./utils/squidstats.service /etc/systemd/system/squidstats.service
Restart daemons:
systemctl daemon-reload
Enable service:
systemctl enable squidstats.service
Start service:
systemctl start squidstats.service
This software has been thoroughly tested and is compatible with Squid version 6.12 in Ubuntu 24.04 and Debian12. Please ensure your Squid installation matches this version or newer for optimal performance.
Make blah blah.
Fork the repository:
git checkout -b feature-name
2.Create a new branch for your feature or fix:
git checkout -b feature-name
3.Commit your changes and push the branch:
git push origin feature-name
4.Open a pull request.
Contributors
The SquidStats project is released under the MIT license.
Need help? _Feel free to contact me 📨 manuelalberto.gorrin@gmail.com_
Project Link: (SquidStats)
Backend: Python, Flask Frontend: HTML, CSS