Skip to content

JimEverest/px

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

203 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

px UI Client - Graphical Proxy Management Tool

A comprehensive graphical user interface for the px proxy library, providing PAC configuration, request monitoring, and advanced proxy management capabilities.

๐Ÿš€ Quick Start

Standard Application Launch

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 file

Development and Testing

For 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

๐Ÿ“‹ System Requirements

  • 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

๐Ÿ—๏ธ Project Structure

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

โœจ Key Features

๐Ÿ”ง Proxy Management

  • Start/Stop Control: Easy proxy service management
  • Status Monitoring: Real-time proxy status and statistics
  • Configuration Persistence: Settings automatically saved

๐Ÿ“ PAC Configuration

  • 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

๐Ÿ“Š Request Monitoring

  • 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

๐Ÿšซ No-Proxy Settings

  • Bypass Configuration: Configure direct connections
  • Pattern Support: Wildcards, IP ranges, domain patterns
  • Visual Management: Easy add/remove interface

๐Ÿ›ก๏ธ Error Handling

  • 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

โšก Performance Features

  • 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

๐ŸŽฎ User Interface

The application features a modern tabbed interface with:

  1. Request Monitoring: Real-time proxy request/response monitoring
  2. PAC Configuration: Proxy Auto-Configuration management
  3. No Proxy Settings: Direct connection bypass rules

Menu System

  • 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

Keyboard Shortcuts

  • Ctrl+O: Load PAC file
  • Ctrl+S: Save PAC file
  • Ctrl+E: Export logs
  • F5: Start proxy
  • F6: Stop proxy

๐Ÿ“ Configuration Files

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

Configuration Contents

  • PAC configuration (source type, content, file paths)
  • UI preferences (window size, positions, themes)
  • Proxy settings (port, address, mode)
  • No-proxy rules and patterns

๐Ÿงช Testing and Development

Manual Testing

Follow the comprehensive testing guide:

# See detailed testing instructions
cat ๆ‰‹ๅŠจๆต‹่ฏ•้ชŒ่ฏๆŒ‡ๅ—.md

Automated Testing

# 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

Development Examples

# Component-specific examples
python examples/pac_config_example.py
python examples/monitoring_example.py
python examples/no_proxy_example.py

๐Ÿ”ง Troubleshooting

Common Issues

  1. Application won't start:

    • Check Python version (3.8+ required)
    • Verify all dependencies are installed
    • Check log files in ~/.px-ui-client/logs/
  2. Proxy fails to start:

    • Ensure port 3128 is not in use
    • Check firewall settings
    • Verify network permissions
  3. PAC configuration errors:

    • Use the built-in PAC validator
    • Check JavaScript syntax
    • Test with simple PAC rules first
  4. Performance issues:

    • Enable update throttling in settings
    • Clear monitoring logs regularly
    • Check system resource usage

Log Files

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

๐Ÿค Contributing

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

๐Ÿ“„ License

This project is part of the px proxy library ecosystem and follows the same licensing terms.

๐Ÿ†˜ Support

For issues, questions, or contributions:

  1. Check the testing guide: ๆ‰‹ๅŠจๆต‹่ฏ•้ชŒ่ฏๆŒ‡ๅ—.md
  2. Review log files for error details
  3. Use the built-in error reporting system
  4. Consult the comprehensive documentation in each module

Start the application now: python -m px_ui.main

About

An HTTP proxy server to automatically authenticate through an NTLM proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.5%
  • Shell 1.7%
  • Other 0.8%