A modern, feature-rich CLI tool to discover Netflix's Open Connect Appliances (OCAs) allocated to your network. Built with Python, this tool provides detailed insights into Netflix's content delivery infrastructure and helps you understand how Netflix optimizes streaming performance for your location.
- π Automatic OCA Discovery: Identifies Netflix OCAs serving your network
- π Enhanced Geolocation: Advanced location resolution using TheAleph API with fallback to standard geocoding
- π Rich Terminal Output: Beautiful CLI with colors, emojis, and tables
- π Multiple Export Formats: JSON, CSV, Excel, and Markdown exports
- πΊοΈ Interactive Maps: Generate HTML maps showing OCA locations
- π³ Docker Support: Ephemeral containers with auto-cleanup and volume mounting
- β‘ Async Performance: Fast, concurrent API calls
- π Robust Error Handling: Comprehensive retry logic and graceful degradation
- π Detailed Logging: Configurable logging with file output
- βοΈ Flexible Configuration: Environment variables and settings files
Using uv (recommended):
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/estcarisimo/Netflix-OCA-Servers-Locator.git
cd Netflix-OCA-Servers-Locator
uv syncTraditional pip installation:
git clone https://github.com/estcarisimo/Netflix-OCA-Servers-Locator.git
cd Netflix-OCA-Servers-Locator
pip install -e .Note: this package is not published to PyPI β
pip install netflix-oca-locatorwill not work. Install from a clone, as shown above.
-
Python 3.10 or higher
-
The
whoiscommand-line tool:# Ubuntu/Debian sudo apt-get install whois # macOS β included with the OS at /usr/bin/whois brew install whois # only if you want a newer version # Alpine apk add whois # Windows (via WSL or Git Bash) # whois is usually available by default
source .venv/bin/activate# Discover OCAs for your network
netflix-oca-locator main
# Quiet mode (minimal output)
netflix-oca-locator main --quiet
# Enable debug logging
netflix-oca-locator main --debug# Export to JSON
netflix-oca-locator main --output json --output-file results.json
# Export to CSV
netflix-oca-locator main --output csv
# Export to Excel with multiple sheets
netflix-oca-locator main --output xlsx
# Export to Markdown
netflix-oca-locator main --output markdown# Generate interactive HTML map
netflix-oca-locator main --map
# Generate and open map in browser
netflix-oca-locator main --open-map# Show version information
netflix-oca-locator version
# Show detailed application info
netflix-oca-locator info
# Show help
netflix-oca-locator --help# Build the Docker image
docker build -t netflix-oca-locator .
# Run with output preservation
docker run --rm -v $(pwd)/output:/app/output netflix-oca-locator main
# Export to JSON
docker run --rm -v $(pwd)/results:/app/output netflix-oca-locator main --output json
# Generate map and export data
docker run --rm -v $(pwd)/maps:/app/output netflix-oca-locator main --map --output csv# Make the script executable
chmod +x run-docker.sh
# Basic usage
./run-docker.sh run
# Export to JSON with custom output directory
./run-docker.sh -o /tmp/oca-results run --output json
# Generate map with debug mode
./run-docker.sh -d run --map --output csv
# Build image only
./run-docker.sh build
# Interactive shell for debugging
./run-docker.sh shell# Basic run
docker-compose run --rm netflix-oca-locator main --output json
# With environment variables
NETFLIX_OCA_DEBUG=true docker-compose run --rm netflix-oca-locator main --debug
# Development mode
docker-compose --profile dev run --rm netflix-oca-locator-dev- Ephemeral Containers: Automatically removed after execution
- Volume Mounting: Preserve output files on host system
- Environment Variables: Configure via Docker environment
- Multi-architecture: Supports AMD64 and ARM64
- Lightweight: Optimized Alpine Linux base (<100MB)
- Security: Non-root user execution
The application supports multiple geocoding providers for enhanced location accuracy:
- hybrid (default): Uses TheAleph API first, falls back to standard geocoding
- aleph: Uses only TheAleph API for geocoding
- geopy: Uses only standard geocoding (Nominatim)
# Set geocoding provider
export NETFLIX_OCA_GEOCODING_PROVIDER=hybridConfigure the application using environment variables with the NETFLIX_OCA_ prefix:
export NETFLIX_OCA_DEBUG=true
export NETFLIX_OCA_LOG_LEVEL=DEBUG
export NETFLIX_OCA_LOG_FILE=/var/log/netflix-oca.log
export NETFLIX_OCA_REQUEST_TIMEOUT=60
export NETFLIX_OCA_MAX_RETRIES=5
export NETFLIX_OCA_GEOCODING_PROVIDER=hybridCreate a .env file in the project directory:
NETFLIX_OCA_DEBUG=false
NETFLIX_OCA_LOG_LEVEL=INFO
NETFLIX_OCA_SHOW_EMOJI=true
NETFLIX_OCA_MAP_ZOOM=4
NETFLIX_OCA_EXPORT_PATH=./exports
NETFLIX_OCA_GEOCODING_PROVIDER=hybridThe application is built with a modular architecture:
src/netflix_oca_locator/
βββ api/ # External API integrations
β βββ fast_com.py # Fast.com API client
β βββ ip_services.py # IP and ISP lookup services
β βββ dns_resolver.py # IPv4/IPv6 DNS resolution and NAT64 handling
βββ cli/ # Command-line interface
β βββ interface.py # Typer-based CLI
βββ core/ # Business logic
β βββ models.py # Pydantic data models
β βββ oca_locator.py # Main orchestration logic
βββ utils/ # Utility modules
β βββ aleph_geocoding.py # TheAleph client and hybrid fallback chain
β βββ formatters.py # Export formatters
β βββ geocoding.py # Location services
β βββ logging.py # Logging configuration
β βββ mapping.py # Map generation
βββ config/ # Configuration management
βββ settings.py # Pydantic settings
# Clone repository
git clone https://github.com/estcarisimo/Netflix-OCA-Servers-Locator.git
cd Netflix-OCA-Servers-Locator
# Install with development dependencies
uv sync --dev
# ...or, without uv: pip install -e ".[dev]"
# Install pre-commit hooks (ruff lint + format on staged files)
uv run pre-commit install# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=netflix_oca_locator --cov-report=term-missing
# Run specific test file
uv run pytest tests/test_core/test_models.py -vTests never make real network calls. Coverage currently sits at about 24%,
concentrated in core/models.py and config/settings.py β the CLI and the api/
clients are not covered yet, and contributions there are especially welcome.
# Lint with ruff
uv run ruff check .
# Format code
uv run ruff format .
# Type checking
uv run mypy src/ruff check and ruff format are enforced in CI. mypy is advisory: there is
a backlog of pre-existing type errors, so the CI step does not fail on them. Please
don't add new ones. See CONTRIBUTING.md for the details.
# Build package
uv build
# Test installation
uv pip install dist/*.whlβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Netflix OCA Locator v2.1.0 π β
β β
β Discover Netflix's Open Connect Appliances serving β
β your network for optimal streaming performance β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Your Network Information
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Public IP: 203.0.113.1 β
β ISP: Example ISP β
β AS Number: AS64512 β
β Country: US β
β BGP Prefix: 203.0.113.0/24 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Netflix OCA Servers Allocated to Your Network
ββββββββββββββββββββββββββββββββββββββββββββββββββββ³ββββββββββββββββββ³βββββββββββββββββ³βββββββ³βββββββ³ββββββββββββββββββ³βββββββββββ
β Domain β IP Address β Location β IATA β ASN β Provider β Method β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β ipv4-c006-mke002-wiscnet-isp.1.oca.nflxvideo.net β 205.213.110.229 β Unknown β - β 2381 β WISCNET1-AS, US β thealeph β
β ipv4-c211-ord001-dev-ix.1.oca.nflxvideo.net β 45.57.120.66 β π Chicago, IL β ORD β 2906 β AS-SSI, US β thealeph β
β ipv4-c152-ord003-ix.1.oca.nflxvideo.net β 23.246.37.204 β π Chicago, IL β ORD β 2906 β AS-SSI, US β thealeph β
β ipv4-c158-ord003-ix.1.oca.nflxvideo.net β 23.246.36.133 β π Chicago, IL β ORD β 2906 β AS-SSI, US β thealeph β
β ipv4-c153-ord001-dev-ix.1.oca.nflxvideo.net β 45.57.121.13 β π Chicago, IL β ORD β 2906 β AS-SSI, US β thealeph β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββ΄βββββββββββββββββ΄βββββββ΄βββββββ΄ββββββββββββββββββ΄βββββββββββ
Found 5 OCA server(s)
We welcome contributions! Please see the Contributing Guidelines for setup instructions, the development workflow, and what to include in a bug report.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
| Document | Contents |
|---|---|
| CONTRIBUTING.md | Development setup, workflow, PR expectations |
| CHANGELOG.md | Release history |
| AGENTS.md | Guidance for AI coding agents working in this repo |
| SECURITY.md | Vulnerability reporting, and what data this tool handles |
| CODE_OF_CONDUCT.md | Community standards |
| docs/THEALEPH_IPV6_SUPPORT.md | IPv6 and NAT64 implementation notes |
| CITATION.cff | Citation metadata for research use |
If you use Netflix OCA Locator in your research, please cite it. GitHub's
"Cite this repository" button reads CITATION.cff.
@software{carisimo2026netflixoca,
author = {Carisimo, Esteban},
title = {Netflix {OCA} Locator},
year = {2026},
version = {2.1.0},
url = {https://github.com/estcarisimo/Netflix-OCA-Servers-Locator},
license = {MIT}
}The geolocation approach uses TheAleph. That work has its own paper; see Enhanced Geocoding Attribution below.
This project is licensed under the MIT License - see the LICENSE file for details.
- Netflix for providing the Fast.com infrastructure that makes this tool possible
- Team Cymru for WHOIS services that provide ASN and ISP information
- TheAleph.ai for enhanced geocoding and network intelligence services
- The Python Community for excellent libraries that power this application
This application uses TheAleph API (https://thealeph.ai) for enhanced geocoding and location resolution of network infrastructure. TheAleph provides superior accuracy for CDN and network node geolocation compared to standard geocoding services.
TheAleph is based on cutting-edge research in DNS PTR record analysis using Large Language Models:
Paper: "The Aleph: Decoding DNS PTR Records With Large Language Models" Authors: Kedar Thiagarajan, Esteban Carisimo, and FabiΓ‘n E. Bustamante Conference: ACM CoNEXT, December 2025 Link: https://estcarisimo.github.io/assets/pdf/papers/2025-the-aleph.pdf
This implementation leverages TheAleph's ability to analyze PTR records and ASN information to provide enhanced location resolution for Netflix OCA servers. The system combines:
- DNS PTR record analysis for infrastructure mapping
- ASN (Autonomous System Number) correlation for network topology understanding
- Large Language Model inference for location extraction from network naming conventions
- Fallback to traditional geocoding services for comprehensive coverage
The application includes advanced networking support and security features:
- IPv6 Support: Intelligent handling of IPv6 domains with NAT64 detection and PTR record analysis
- HTTPS Security: Full SSL certificate validation for secure API communications
- Hybrid Fallback: Multi-tier fallback system ensuring reliable location resolution
For comprehensive technical details about IPv6 support, NAT64 handling, and implementation specifications, see the Technical Documentation.
Note: TheAleph API integration now uses full HTTPS security with SSL certificate validation enabled.
Note: This tool is for educational and network analysis purposes. Please use responsibly and in accordance with Netflix's terms of service.