How ka-369/vpn-traffic-identification works
This repository trains a VPN-versus-non-VPN Random Forest and documents a live-classification workflow. Offline, the dataset is normalized and aligned to 23 features, labels are encoded, the model is trained and validated, and model assets are saved. Live, NFStream captures flows, features are reconstructed, and a trained model produces a label and confidence. The live implementation is described in the README but is absent from the supplied tree and source excerpts, so its internal links are documented rather than source-verified.
Main entry points: model.py Prepare and train · consolidated_traffic_data.csv Labeled flow data
Components 10
Model training
- Labeled flow data
consolidated_traffic_data.csv - Prepare and train
model.py - Random Forest model
- Label encoder
Live detection
- Flow capture
- Feature reconstruction
- Flow inference
Classification results
- VPN classification
Other components
- Network operator
- Network traffic
Connections 10
- Labeled flow data → Prepare and train: loads
model.py - Prepare and train → Random Forest model: saves model
model.py - Prepare and train → Label encoder: saves encoder
model.py - Network operator → Flow capture: starts capture
README.md - Network traffic → Flow capture: provides flows
README.md - Flow capture → Feature reconstruction: extracts features
README.md - Feature reconstruction → Flow inference: supplies features
- Random Forest model → Flow inference: loads model
README.md - Label encoder → Flow inference: loads encoder
README.md - Flow inference → VPN classification: prints label
README.md