A comprehensive graphical user interface for the px proxy library, providing PAC configuration, request monitoring, and advanced proxy management capabilities.
The recommended ways to start the px UI client:
# Method 1: Run as Python module (recommended)
python -m px_ui.main
# Method 2: Direct execution
python px_ui/main.py
# Method 3: Using convenience scripts
python start_px_ui.py # Cross-platform Python script
./start_px_ui.sh # Linux/macOS shell script
start_px_ui.bat # Windows batch fileFor development and testing purposes:
# Integrated UI example (development/testing)
python examples/integrated_ui_example.py
# Error handling testing
python test_error_handling_integration.py
# PAC configuration testing
python test_pac_auto_save.py- Python: 3.8 or higher
- Operating System: Windows, macOS, or Linux
- Dependencies: All required packages are listed in the project requirements
- Network: Internet connection for proxy functionality testing
px_ui/
โโโ main.py # ๐ฏ Main application entry point
โโโ README.md # This documentation
โโโ __init__.py # Package initialization
โโโ models/ # Core data models
โ โโโ request_data.py # HTTP request data model
โ โโโ response_data.py # HTTP response data model
โ โโโ pac_configuration.py # PAC file configuration model
โ โโโ proxy_status.py # Proxy service status model
โโโ ui/ # User interface components
โ โโโ main_window.py # Main application window
โ โโโ pac_config_panel.py # PAC configuration interface
โ โโโ monitoring_view.py # Request monitoring interface
โ โโโ no_proxy_panel.py # No-proxy settings interface
โ โโโ response_details_dialog.py # Response details viewer
โ โโโ error_*.py # Error handling UI components
โโโ proxy/ # Proxy extensions and monitoring
โ โโโ proxy_controller.py # Proxy service controller
โ โโโ enhanced_handler.py # Enhanced HTTP request handler
โ โโโ configuration_bridge.py # Configuration integration
โโโ communication/ # Event-driven communication
โ โโโ event_system.py # Core event system
โ โโโ event_processor.py # Event processing logic
โ โโโ event_queue.py # Event queue management
โโโ config/ # Configuration management
โ โโโ config_manager.py # Configuration persistence
โ โโโ ui_settings.py # UI settings model
โโโ error_handling/ # Comprehensive error management
โ โโโ error_manager.py # Error detection and handling
โ โโโ error_reporter.py # Error reporting system
โ โโโ fallback_manager.py # Fallback strategies
โโโ performance/ # Performance optimization
โโโ performance_monitor.py # Resource monitoring
โโโ update_throttler.py # UI update optimization
โโโ resource_cleaner.py # Memory management
- Start/Stop Control: Easy proxy service management
- Status Monitoring: Real-time proxy status and statistics
- Configuration Persistence: Settings automatically saved
- Multiple Sources: Inline editing, file loading, URL loading
- Syntax Validation: Real-time JavaScript syntax checking
- Testing Tools: Test PAC rules against specific URLs
- Auto-Save: Configuration automatically preserved
- Real-Time Display: Live view of proxy requests and responses
- Advanced Filtering: Filter by URL, proxy type, status code
- Response Details: Detailed view of headers and content
- Export Capabilities: Save monitoring data for analysis
- Bypass Configuration: Configure direct connections
- Pattern Support: Wildcards, IP ranges, domain patterns
- Visual Management: Easy add/remove interface
- Comprehensive Detection: Automatic error detection and reporting
- Recovery Strategies: Intelligent fallback mechanisms
- User Guidance: Clear error messages and recovery suggestions
- Error Reporting: Detailed error reports for troubleshooting
- Resource Optimization: Automatic memory and CPU management
- Update Throttling: Smooth UI performance under high load
- Virtual Scrolling: Efficient handling of large data sets
- Background Processing: Non-blocking operations
The application features a modern tabbed interface with:
- Request Monitoring: Real-time proxy request/response monitoring
- PAC Configuration: Proxy Auto-Configuration management
- No Proxy Settings: Direct connection bypass rules
- File: Load/Save PAC files, Export logs and reports
- Proxy: Start/Stop proxy, Clear monitoring data
- View: Refresh interface, Toggle auto-scroll
- Help: About information and documentation
Ctrl+O: Load PAC fileCtrl+S: Save PAC fileCtrl+E: Export logsF5: Start proxyF6: Stop proxy
Configuration is automatically saved to platform-appropriate locations:
- Windows:
%APPDATA%\px-ui-client\px_ui_config.json - macOS:
~/Library/Application Support/px-ui-client/px_ui_config.json - Linux:
~/.config/px-ui-client/px_ui_config.json
- PAC configuration (source type, content, file paths)
- UI preferences (window size, positions, themes)
- Proxy settings (port, address, mode)
- No-proxy rules and patterns
Follow the comprehensive testing guide:
# See detailed testing instructions
cat ๆๅจๆต่ฏ้ช่ฏๆๅ.md# Run all tests
python -m pytest tests/
# Run specific test categories
python tests/test_pac_validation.py
python tests/test_error_handling_system.py
python tests/test_performance.py# Component-specific examples
python examples/pac_config_example.py
python examples/monitoring_example.py
python examples/no_proxy_example.py-
Application won't start:
- Check Python version (3.8+ required)
- Verify all dependencies are installed
- Check log files in
~/.px-ui-client/logs/
-
Proxy fails to start:
- Ensure port 3128 is not in use
- Check firewall settings
- Verify network permissions
-
PAC configuration errors:
- Use the built-in PAC validator
- Check JavaScript syntax
- Test with simple PAC rules first
-
Performance issues:
- Enable update throttling in settings
- Clear monitoring logs regularly
- Check system resource usage
Application logs are saved to:
- Main log:
~/.px-ui-client/logs/px_ui.log - Error log:
~/.px-ui-client/logs/error.log - Performance log:
~/.px-ui-client/logs/performance.log
This project follows a modular architecture with clear separation of concerns:
- Models: Data structures and validation
- UI: User interface components
- Proxy: Proxy service integration
- Communication: Event-driven messaging
- Config: Settings and persistence
- Error Handling: Comprehensive error management
- Performance: Optimization and monitoring
This project is part of the px proxy library ecosystem and follows the same licensing terms.
For issues, questions, or contributions:
- Check the testing guide:
ๆๅจๆต่ฏ้ช่ฏๆๅ.md - Review log files for error details
- Use the built-in error reporting system
- Consult the comprehensive documentation in each module
Start the application now: python -m px_ui.main