Skip to content

Releases: ponich/socks5-killswitch

v0.0.4

06 Feb 22:21
2f5914c

Choose a tag to compare

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, idempotent

Other

  • Added Python 3.14 classifier

v0.0.3

06 Feb 17:02

Choose a tag to compare

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__() and create_session() accept preflight: bool = True
  • check_ip() does a socket.create_connection() to the proxy host:port before the IP check request
  • If unreachable → kill switch ON, ProxyError raised, no ipify request sent
  • Set preflight=False to restore previous behavior
  • Version bumped to 0.0.3

v0.0.2

06 Feb 16:15

Choose a tag to compare

What's new

  • GitHub Actions CI: tests on Python 3.9–3.13, lint, type check
  • Automated PyPI publishing via Trusted Publishers (OIDC)
  • Dynamic CI badge in README