$ show XX-net/XX-Net
XX-Net is a desktop application for circumventing internet censorship, primarily targeting the Great Firewall of China. It operates as a multi-protocol proxy client that supports Google App Engine (GAE) fronting, custom X-Tunnel, Cloudflare, CloudFront, and direct connections. The system consists of a launcher with a web-based control panel, a smart router for DNS and traffic routing, and multiple frontend modules that implement various obfuscation and tunneling techniques. The codebase is a large, monolithic Python 2/3 project with heavy use of vendored libraries (tlslite, hyper, ecdsa, asn1crypto, dnslib) for custom TLS, HTTP/2, and cryptographic operations. It is not a data research project; it is a pure application focused on network proxy functionality.
The LLM identified 4 files worth highlighting for reuse:
Implements a generic IP pool manager that tracks handshake RTT, fail counts, and speed for proxy frontend IPs. It persists state to disk, supports background scanning, and provides get_ip_sni_host for load-balanced selection. Although tightly coupled to the front_base module, the core scoring and persistence logic could be extracted for any network connection pool that requires adaptive quality-of-service tracking.
A lightweight HTTP client with optional SOCKS proxy support and TLS. It is self-contained, uses only standard library modules (ssl, socket, select), and provides a simple request/response API. This is a reusable component for any project needing a minimal HTTP client without external dependencies.
A custom logging module that buffers log lines, supports file rotation, console colors, and per-module logger instances. It provides get_last_lines and get_new_lines for UI consumption. This is a reusable logging utility, particularly useful for applications that need to serve log entries via a web interface.
A minimal HTTP server with WebSocket support, built on standard library sockets. It handles GET/POST requests and can serve static files. This is a reusable component for any project needing a lightweight embedded HTTP server.