Skip to main content

SOCKS proxy for routing traffic through WiFi interface

Project description

hotspot-socks-proxy

A high-performance SOCKS5 proxy server designed to route traffic through WiFi interfaces. Perfect for scenarios where you need to ensure traffic goes through a specific network interface.

Features

Core Functionality

  • SOCKS5 proxy server with multi-process support
  • Automatic WiFi interface detection and validation
  • Built-in DNS resolution with multiple fallback options
  • Process pool management with automatic recovery
  • Clean shutdown handling

Performance & Reliability

  • Multi-process architecture for optimal performance
  • Thread-safe statistics tracking
  • Automatic process recovery on failure
  • Configurable DNS resolvers with fallback mechanisms
  • Connection pooling and timeout handling

User Interface

  • Real-time terminal UI with bandwidth monitoring
  • Live connection statistics
  • Clean terminal interface with borders
  • Keyboard controls (Ctrl-C to exit)
  • Automatic unit scaling for bandwidth display

Network Management

  • Automatic WiFi interface detection
  • Interface validation and filtering
  • IP address management
  • Support for both wireless and fallback interfaces

Additional Features

  • Clipboard integration for easy proxy configuration sharing
  • Support for both Windows and Unix-like systems
  • Root privilege checking
  • Comprehensive error handling and reporting

Installation

pip install hotspot-socks-proxy

Usage

Run the proxy server (requires root/admin privileges):

# Basic usage
sudo hotspot-proxy proxy

# Custom port and processes
sudo hotspot-proxy proxy --port 9050 --processes 4

Options

  • --processes/-p: Number of proxy processes (default: CPU count)
  • --port: Port to listen on (default: 9050)

Example Code

from hotspot_socks_proxy.core.proxy import create_proxy_server

# Start a SOCKS proxy server on localhost:9050 with 4 processes
create_proxy_server("127.0.0.1", 9050, 4)

Requirements

  • Python >= 3.12
  • Root/Administrator privileges for proper operation
  • Required packages (automatically installed):
    • typer: CLI interface
    • prompt-toolkit: Terminal UI
    • rich: Pretty output formatting
    • psutil: System and process utilities
    • pyperclip: Clipboard integration
    • dnspython: DNS resolution

Development

Project Structure

src/hotspot_socks_proxy/
├── cmd/                 # Command-line interface modules   ├── cli.py          # Main CLI entry point   ├── find_wifi.py    # WiFi interface detection   ├── http.py         # HTTP proxy implementation   └── socks.py        # SOCKS proxy interface
├── core/               # Core functionality   ├── lib/            # Core library components      ├── proxy_server.py    # Multi-process server      ├── proxy_stats.py     # Statistics tracking      ├── proxy_ui.py        # Terminal UI      └── socks_handler.py   # SOCKS protocol handler   ├── exceptions.py   # Custom exceptions   ├── network.py      # Network interface management   └── proxy.py        # Main entry point

Documentation

Full documentation is available at [GitHub Pages URL].

License

This project is licensed under the GPL-3.0 License.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hotspot_socks_proxy-3.3.3.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hotspot_socks_proxy-3.3.3-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file hotspot_socks_proxy-3.3.3.tar.gz.

File metadata

  • Download URL: hotspot_socks_proxy-3.3.3.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for hotspot_socks_proxy-3.3.3.tar.gz
Algorithm Hash digest
SHA256 e56dc8f4117f38562c4d0958b9f17e4de4ac30e4b50a635d36e174a109a1dcc4
MD5 86ec458ad32c50b5582873485bf37e2d
BLAKE2b-256 cb994027503ff1609b7fb7d69acfe34f736671e023f57a5f8e2feaef917d7c96

See more details on using hashes here.

File details

Details for the file hotspot_socks_proxy-3.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hotspot_socks_proxy-3.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b35d2ee8ac5157cfd4b5c0fe237fe52e27fc63759b011e5e1eec5f336418b4af
MD5 7e259f9c525861a4bfae438b3a81e677
BLAKE2b-256 52c4840d3a45172eb5026d692d41f4f1dc81f8ca4949bd04f00472466ea63de9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page