Skip to main content

Socks over Unix Domain Socket

opener = socks.build_opener(socks_path="/var/lib/tor-shared/public.socket")
with opener.open("https://www.google.com/") as fp:
    assert fp.code == 200
    assert fp.read(20) == b"<!doctype html><html"

Features

  • Allows applications to connect to internet with just unix domain socket
  • Works with containers and systemd private network
  • Supports both sync and async usage
  • urllib compatible build_opener
  • Optional httpcore transport for use with libraries like httpx

This is not a feature complete socks proxy. Only client mode is supported. It is designed for use with tor's unix socks socket

  • No support for socks bind
  • No support for udp
  • Only NoAuth and UserPass auth supported
  • Only supports socks5h protocol. Connects to the socks proxy as domain name. However ip string can be passed for domain name with tor

Usage

Please check socks_test.py and Makefile

Metadata

Release files for socks-uds 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socks-uds 1.3
File Size Uploaded
socks_uds-1.3.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for socks-uds 1.3
File Interpreter ABI Platform
socks_uds-1.3-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / socks_uds-1.3.tar.gz

Download URL socks_uds-1.3.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ad51b26562c1d515407b33ceb748c9213903122c4a4a85f074dc19c3d7d21d94
BLAKE2b-256 checksum
How to use checksums
55f976e84dcc0cd5418d9bf6c680ad0ce33ebedebb77e9a898e83950858b0ecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / socks_uds-1.3-py3-none-any.whl

Download URL socks_uds-1.3-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06e30c584194549f67d4bb2205776d13e54447e84540e0750b5e1c7dbcdf76a3
BLAKE2b-256 checksum
How to use checksums
c3f9d4111225d8fb3749b4d2a7059e3779918905384ef435f895042ef36ed44d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

1.3 This release

2 release files

1.2

2 release files

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page