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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
socks_uds-1.3-py3-none-any.whl
(12.0 kB
view hashes)