Px v0.12.0
Pre-release
Pre-release
New features
- PAC file encoding is now auto-detected using an extended browser-compatible
algorithm: HTTP Content-Type charset (for URL-loaded PACs), then BOM check,
then UTF-8, then Windows code page cascade (cp1252, cp1251), then Latin-1
fallback. This handles enterprise environments where IIS or other Windows
servers serve PAC files in cp1252 or cp1251 without proper charset headers.
The--pac_encodingoption remains available as an explicit override if
auto-detection does not work. PAC decode and load failures are now always
printed instead of being hidden behind--debug(#269).
Bug fixes
- Fixed
--workers> 1 crashing on Windows withOSError: [WinError 87]due
to IOCP socket registration conflict. Each worker now creates its own
independent listening sockets instead of sharing from the parent process
(#267). - Enabled
--workerson macOS — previously disabled because the old socket
sharing approach was incompatible. The new per-worker socket model uses
SO_REUSEPORTon Linux and macOS andSO_REUSEADDRon Windows. - Fixed px randomly becoming unresponsive after running for days when using
--debugmode.os.fsync()in the debug log write path could block the
asyncio event loop indefinitely on slow or locked filesystems (antivirus,
network drives). Replaced withfile.flush()which pushes data to the OS
page cache without blocking (#268).
Improvements
- Px now automatically raises the open file descriptor soft limit
(RLIMIT_NOFILE) at startup on Linux and macOS. macOSlaunchddefaults to
256 and Linux defaults to 1024, both too low for a proxy handling concurrent
CONNECT tunnels. The limit is raised tomin(hard_limit, 65536)with a
step-down fallback for macOS wherekern.maxfilesperprocmay reject high
values (#272).