Last updated on March 25, 2024 pm
Shynet 是一款用 python 编写的现代、隐私友好、无需Cookie或JS即可工作的网络流量统计工具。
相比 Umami, Shynet 支持通过 1 pixel 的图像进行统计,而不依赖 JS, 并且 Shynet 统计的信息更加详细。
搭建 Shynet
1
| mkdir -p ~/app/shynet && cd ~/app/shynet && nano docker-compose.yml
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| version: '3.6' services: shynet: image: milesmcc/shynet:latest restart: always env_file: - .env volumes: - ./db:/var/local/shynet/db/ - /etc/localtime:/etc/localtime:ro networks: default: external: true name: ngpm
|
1 2 3 4 5 6 7 8 9 10
| wget -O .env https://github.com/milesmcc/shynet/raw/master/TEMPLATE.env
mkdir -p db && chmod 777 db sudo docker-compose up -d
|
1 2 3 4
| sudo docker-compose exec -it shynet ./manage.py registeradmin <your email>
|
配置混淆
1 2 3
| sub_filter 'https://xxx/ingress/' 'https://xxx/vue/'; sub_filter_once off; sub_filter_types application/javascript;
|
配置 Hexo
1 2 3 4
| hexo.extend.injector.register('head_begin', ` <script defer src="https://xxxx/vue/xxxx/script.js"></script> `);
|