A comprehensive desktop application for managing and validating BitTorrent trackers. Built with Python and Tkinter, featuring duplicate detection, multi-protocol validation, and persistent history tracking.
- Smart URL Extraction: Parse tracker URLs from any text input
- URL Normalization: Intelligent duplicate removal with protocol-aware normalization
- Multi-Protocol Support: HTTP, HTTPS, UDP, and magnet links
- Batch Processing: Handle large tracker lists efficiently
- Concurrent Validation: Multi-threaded validation with configurable workers
- Protocol-Specific Methods:
- HTTP/HTTPS: HEAD/GET requests with proper redirect handling
- UDP: Native BitTorrent protocol implementation
- Magnet: Syntax validation and info hash extraction
- Real-time Progress: Live updates with progress bars and status indicators
- Configurable Timeouts: Adjustable validation thresholds per protocol
- Persistent Storage: SQLite database with optimized schema
- Reliability Scoring: Success rate tracking with minimum check thresholds
- Favorite System: Custom notes and quick access to preferred trackers
- Performance Metrics: Response time tracking and statistical analysis
- Validation Sessions: Complete history of batch operations
- Tab-Based Workflow: Logical workflow (Find → Validate → Export → History)
- Theme Support: Light and dark mode with persistent preferences
- Auto-Save: Batched configuration saves for optimal performance
- Responsive Design: Real-time UI updates during validation
- Keyboard Shortcuts: Efficient workflow navigation
- Multiple Formats: TXT, JSON, CSV, YAML export options
- Clipboard Integration: One-click copy of working trackers
- Filtered Exports: Working/dead/all trackers with metadata
- Structured Data: Complete validation results with timestamps
- Preset Management: Built-in tracker list presets
- Network Interface Binding: Linux-specific interface selection
- Resource Monitoring: System health checks and performance optimization
- Auto-Save Management: Intelligent batched configuration saves
- Plugin Architecture: Extensible design for custom functionality
- Comprehensive Logging: Detailed operation logging for debugging
torrent-tracker/
├── controllers/
│ ├── __init__.py
│ └── main_controller.py # Main application logic (MVC)
├── models/
│ ├── database_models.py # SQLite database management
│ ├── __init__.py
│ └── tracker_models.py # Data classes and collections
├── views/
│ ├── history_view.py # History and analytics tab
│ ├── __init__.py
│ └── main_view.py # Primary GUI implementation
├── services/
│ ├── __init__.py
│ ├── plugin_base.py # Plugin system foundation
│ ├── tracker_parser.py # URL parsing and normalization
│ └── tracker_validator.py # Multi-protocol validation
├── network/
│ └── interface_bind.py # Network interface management
├── utils/
│ └── helpers.py # Utility functions and classes
├── config.py # Configuration management
├── main.py # Application entry point
├── requirements.txt # Project dependencies
└── README.md # Documentation
main.py- Application entry point with proper initializationcontrollers/main_controller.py- Core business logic following MVC patternviews/main_view.py- Primary user interface implementationmodels/- Data models and database managementservices/- Parser, validator, and plugin servicesnetwork/interface_bind.py- Linux network interface bindingutils/helpers.py- Utility functions and performance tools
- Python 3.7 or higher
- pip package manager
- Clone the repository:
git clone https://github.com/appaKappaK/tracker-manager.git
cd torrent-tracker- Create and activate virtual environment (recommended):
python -m venv venv
source venv/bin/activate # Linux/MacOS
# or
venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt- Run the application:
python main.pyCore dependencies include:
tkinter- GUI framework (built-in)sqlite3- Database (built-in)psutil- System resource monitoringPyYAML- YAML export support
-
Find Duplicates Tab
- Paste tracker lists into the input area
- Click "Find Duplicates" for intelligent URL normalization
- Review statistics: total, unique, and duplicate counts
-
Validate Trackers Tab
- Configure validation settings (workers, timeouts)
- Select network interface (Linux systems)
- Start validation with real-time progress monitoring
- Stop validation at any time with Escape key
-
Export Results Tab
- Export working trackers as plain text for immediate use
- Save complete results in structured formats (JSON, CSV, YAML)
- Copy working trackers directly to clipboard
- Use preset tracker lists for quick setup
-
History & Analytics Tab
- View comprehensive validation history
- Identify reliable trackers based on success rates
- Manage favorites with custom notes
- Analyze performance trends and statistics
Ctrl+D- Find duplicatesCtrl+V- Validate trackersCtrl+E- Export resultsCtrl+T- Toggle themeCtrl+Q- Quit applicationEscape- Stop validationF1- Show help
The application automatically creates a configuration file (tracker_manager_config.json) with default settings:
{
"validation": {
"max_workers": 10,
"timeout": 10,
"socket_timeout": 5,
"network_interface": null
},
"gui": {
"window_width": 800,
"window_height": 600,
"auto_scroll": true,
"dark_mode": false
},
"trackers": {
"default_ports": {
"http": 80,
"https": 443,
"udp": 6969
}
}
}- Config File:
tracker_manager_config.json - Database:
tracker_history.db - Log File:
tracker_manager.log - Exports:
working-trackers/directory
The project follows strict organizational patterns with clear section headers:
The application follows MVC architecture:
- Models: Data structures in
models/ - Views: GUI components in
views/ - Controllers: Business logic in
controllers/
Extend functionality by implementing the services/plugin_base class:
# Example from MainController:
# ===== VIEW AND INITIALIZATION METHODS =====
# ===== NETWORK INTERFACE METHODS =====
# ===== TRACKER PROCESSING METHODS =====
# ===== VALIDATION CONTROL METHODS =====
# ===== EXPORT AND COPY METHODS =====
# ===== DATABASE AND HISTORY METHODS =====
# ===== STATISTICS AND ANALYSIS METHODS =====The tools/ directory contains utilities for development and debugging:
check_duplicates.py- Standalone duplicate checkingdebug_app.py- Application debugging utilitiestest_database.py- Database functionality testingtest_fixes.py- Patch testing and validation
class NewProtocolValidator:
def validate(self, tracker: Tracker) -> ValidationResult:
# Implement protocol-specific validation
passdef export_custom_format(self) -> str:
# Implement custom export logic
return formatted_datafrom services.plugin_base import Plugin
class CustomPlugin(Plugin):
def before_validation(self, trackers):
# Pre-process trackers
return processed_trackers
def after_validation(self, results):
# Post-process results
return enhanced_results- trackers - Individual tracker records with validation history
- validation_sessions - Session summaries for batch validations
- favorites - User-selected favorite trackers with notes
- Indexed Queries: Performance-optimized database access
- Data Integrity: SQL constraints and validation rules
- Efficient Storage: Normalized URL storage with deduplication
The application supports network interface selection on Linux systems via network/interface_bind.py:
# Automatic interface detection
interfaces = validator.interface_binder.detect_interfaces()
# Manual interface selection
validator.set_network_interface('eth0')- HTTP/HTTPS: Full protocol implementation with connection pooling
- UDP: Native BitTorrent tracker protocol
- Magnet: URI validation and info hash extraction
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code organization patterns with clear section headers
- Maintain the MVC architecture separation
- Add comprehensive docstrings and comments
- Update documentation for new features
- Use the tools directory for testing and debugging
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.