Skip to main content

Socks over Unix Domain Socket

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socks_uds-1.3.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

socks_uds-1.3-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file socks_uds-1.3.tar.gz.

File metadata

  • Download URL: socks_uds-1.3.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for socks_uds-1.3.tar.gz
Algorithm Hash digest
SHA256 ad51b26562c1d515407b33ceb748c9213903122c4a4a85f074dc19c3d7d21d94
MD5 12f36931352f838e3490ca84e4911b81
BLAKE2b-256 55f976e84dcc0cd5418d9bf6c680ad0ce33ebedebb77e9a898e83950858b0ecc

See more details on using hashes here.

File details

Details for the file socks_uds-1.3-py3-none-any.whl.

File metadata

  • Download URL: socks_uds-1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for socks_uds-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 06e30c584194549f67d4bb2205776d13e54447e84540e0750b5e1c7dbcdf76a3
MD5 bb472ce9318584358e2d1ea6940b2140
BLAKE2b-256 c3f9d4111225d8fb3749b4d2a7059e3779918905384ef435f895042ef36ed44d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page