|
|
1 год назад | |
|---|---|---|
| .idea | 1 год назад | |
| assets | 1 год назад | |
| database | 1 год назад | |
| parsers | 1 год назад | |
| services | 1 год назад | |
| static | 1 год назад | |
| templates | 1 год назад | |
| utils | 1 год назад | |
| .gitignore | 1 год назад | |
| LICENSE | 1 год назад | |
| README.md | 1 год назад | |
| app.py | 1 год назад | |
| install.sh | 1 год назад | |
| requirements.txt | 1 год назад |
A modern tool for parsing and analyzing Squid logs, providing a sleek and user-friendly dashboard to visualize real-time connection data. This project helps network administrators monitor and manage Squid proxy connections effectively.
Warning: 🚨 The first execution may cause high CPU usage.
squidclient installed on the server⚠️ !!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
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:
sudo ./install.sh
Clone the repository:
git clone https://github.com/kaelthasmanu/SquidStats.git
cd SquidStats
Install requeriments python with pip or pip3:
pip install -r requirements.txt
Create a .env file in the project root and add the following content:\ Note: for use MARIADB need your own database running
SQUID_HOST="127.0.0.1"
SQUID_PORT=3128
FLASK_DEBUG = "True"
DATABASE_TYPE="SQLITE" # You can use "MARIADB" or "SQLITE"
SQUID_LOG = "/home/manuel/Desktop/SquidStats/parsers/access.log"
DATABASE_STRING_CONNECTION = "/home/manuel/Desktop/SquidStats/" #or mysql+pymysql://user:password@host:port/db
REFRESH_INTERVAL = 60
Run App with python or python3 🚀:
python app.py
With your preferred browser, visit the installation URL:
http://ip/hostname:5000
🕒 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
This software has been thoroughly tested and is compatible with Squid version 6.12. Please ensure your Squid installation matches this version or newer for optimal performance.
Backend: Python, Flask Frontend: HTML, CSS
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.
Project Link: (SquidStats)
This project is licensed under the MIT License. See the LICENSE file for details.