python SDK for CDN Infrastructure Monitoring Project from NISL-THU
Project description
项目简介
目前,CDN 服务已经承载了互联网 30% 以上的 Web 流量,不同的 CDN 厂商纷纷通过在全球不同位置部署节点来提供服务、扩大市场。 设计大规模网络测量实验,测量分析不同的 CDN 厂商的部署策略、节点分布和服务配置等均可能存在差异,并分析其中可能存在的安全问题。
Usage
pip install cdnmon
from cdnmon.utils.ip_ranges import alicloud
ipv4_networks, ipv6_networks = alicloud.IPRange.parse()
print(ipv4_networks, ipv6_networks)
Quick Start on Local Machine
# Step 1: modify database configuration
vim .secrets.example
# Step 2: run scripts
python scripts/get_ip_ranges.py
python scripts/generate_scanning_tasks.py
python scripts/get_top_domains.py
python scripts/detect_cdn_by_cname.py
Setup Development Environment
# Install python
sudo apt install python3 python3-pip
pip install -r requirements.txt
# Install act (optional, just for testing GitHub Actions)
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
# Install pre-commit
pip install pre-commit
pre-commit install
# Run pre-commit before commit
pre-commit run --all
Verify GitHub Actions
act -j build --artifact-server-path artifacts --secret-file .secrets
Play with PyPi
pip install build wheel twine
python -m build --wheel
twine upload --repository testpypi dist/*
twine upload --repository pypi dist/*
pip install -i https://test.pypi.org/simple/ cdnmon
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
cdnmon-0.0.1-py3-none-any.whl
(26.4 kB
view hashes)