How aditya0x53/zero-trust-browser-gateway works
The product is a Zero Trust forward proxy for detecting evasive JavaScript threats. Its main workflow intercepts client traffic, analyzes pages in headless Chromium, derives behavioral features, scores risk, and applies allow/block/quarantine policy; traffic and decisions are logged for dashboard review. The graph also preserves documented analysis capabilities and model training. Some subsystem links come from the README rather than sampled call sites; unsampled components are included only where the README or source index supports them.
Main entry points: forward_proxy.py Forward proxy · policy_engine.py Policy engine · feature_extractor.py Feature extractor · analyser_service.py Browser analyzer
Components 17
Traffic ingress
- Forward proxy
proxy/forward_proxy.py
Behavioral detection
- Browser analyzer
browser_analyser/analyser_service.py - Entropy analysis
browser_analyser/entropy_analyzer.py - Graph analysis
browser_analyser/graph_analyzer.py - Anomaly detection
browser_analyser/anomaly_detector.py - Feature extractor
feature_engine/feature_extractor.py - Feature plugins
feature_engine/plugin_manager.py
Risk and policy
- Risk scorer
ml_model/risk_scorer.py - Model training
ml_model/Train.py - Policy engine
policy/policy_engine.py - Quarantine records
quarantine
Operations and review
- Traffic logger
proxy/traffic_logger.py - Management dashboard
dashboard/dashboard_app.py - Blocked page
dashboard/templates/blocked.html
Shared infrastructure
- Configuration loader
config/config_loader.py - Logging setup
config/logging_setup.py
Other components
- Browser / client
Connections 22
- Browser / client → Forward proxy: sends traffic
README.md - Forward proxy → Browser analyzer: requests analysis
proxy/forward_proxy.py - Browser analyzer → Feature extractor: reports behavior
README.md - Feature extractor → Risk scorer: provides features
README.md - Risk scorer → Policy engine: provides risk
README.md - Policy engine → Feature extractor: extracts features
policy/policy_engine.py - Policy engine → Risk scorer: scores features
policy/policy_engine.py - Policy engine → Quarantine records: writes records
policy/policy_engine.py - Forward proxy → Policy engine: requests decision
README.md - Forward proxy → Traffic logger: logs traffic
proxy/forward_proxy.py - Management dashboard → Traffic logger: reads traffic
dashboard/dashboard_app.py - Policy engine → Forward proxy: returns action
README.md - Policy engine → Blocked page: serves on block
README.md - Browser analyzer → Entropy analysis: analyzes scripts
README.md - Feature extractor → Graph analysis: derives graph features
README.md - Browser analyzer → Anomaly detection: uses detection
README.md - Feature extractor → Feature plugins: loads extensions
README.md - Model training → Feature extractor: uses features
ml_model/Train.py - Forward proxy → Configuration loader: loads settings
proxy/forward_proxy.py - Browser analyzer → Configuration loader: loads settings
browser_analyser/analyser_service.py - Forward proxy → Logging setup: uses logging
proxy/forward_proxy.py - Feature extractor → Logging setup: uses logging
feature_engine/feature_extractor.py