Releases: ponich/socks5-killswitch
Releases · ponich/socks5-killswitch
v0.0.4
What's new
force_ipv4 — IPv6 workaround for SOCKS5 proxies
Many SOCKS5 proxies (PIA, NordVPN) don't support IPv6 addresses. When a hostname resolves to IPv6 first, the proxy rejects it with "Address type not supported".
New ipv4_only parameter on SafeSession and create_session:
session = create_session(
host="proxy-nl.privateinternetaccess.com",
port=1080,
username="...",
password="...",
ipv4_only=True,
)Also available as a standalone function:
from socks5_killswitch import force_ipv4
force_ipv4() # patches socket.getaddrinfo globally, idempotentOther
- Added Python 3.14 classifier
v0.0.3
Preflight proxy check in check_ip()
Fixes #3: check_ip() now verifies the proxy is TCP-reachable before hitting ipify.org. If the proxy is down, the kill switch activates immediately — your real IP is never sent to external services.
Changes
SafeSession.__init__()andcreate_session()acceptpreflight: bool = Truecheck_ip()does asocket.create_connection()to the proxy host:port before the IP check request- If unreachable → kill switch ON,
ProxyErrorraised, no ipify request sent - Set
preflight=Falseto restore previous behavior - Version bumped to 0.0.3