Skip to main content

Slippers is a lightweight, zero-dependency SOCKS5 proxy that runs locally and transparently forwards traffic to an upstream SOCKS5 proxy requiring authentication. It allows clients that don't support SOCKS5 authentication (like some browsers) to use an authenticated proxy indirectly.

Installation

pip install slippers-proxy

CLI Usage

python -m slippers "socks5://username:password@my-socks-server.net:1080"

By default, slippers listens on localhost:1080

You can now use your local unauthenticated SOCKS5 endpoint

curl --socks5-hostname "socks5://127.0.0.1:1080" https://ifconfig.io/country_code
US
python -m slippers "socks5://username:password@my-socks-server.net:1080"
16:04:07 [INFO] Listening on localhost:1080 (4)
16:04:09 [INFO] Tunnel from 127.0.0.1:64633 (7) to my-socks-server.net:1080 (8) established
16:04:10 [INFO] Tunnel from 127.0.0.1:64633 (7) to my-socks-server.net:1080 (8) closed

Programmatic Usage

import os
import slippers
from playwright.sync_api import sync_playwright

username = os.getenv("SOCKS_USERNAME")
password = os.getenv("SOCKS_PASSWORD")


def main():
    with (
        sync_playwright() as p,
        slippers.Proxy(
            f"socks5://{username}:{password}@my-socks-server.net:1080"
        ) as proxy,
    ):
        browser = p.chromium.launch(
            headless=True,
            proxy={"server": proxy.url(dns=True)},  # point to slippers local server
        )
        page = browser.new_page()
        page.goto("https://ifconfig.io/country_code", wait_until="domcontentloaded")
        print(page.text_content("body").strip())
        browser.close()


if __name__ == "__main__":
    main()

API

class slippers.Proxy(proxy: str, host: str = "localhost", port: int = 1080)

Create a handler for a local, unauthenticated SOCKS5 server which forwards traffic to an upstream authenticated SOCKS5 proxy.

    start() -> None

    Start the local proxy in a background process. Once started it can start accepting connections.

    stop() -> None

    Stop the background proxy process (if running).

    url(dns: bool = False) -> str

    Return the SOCKS5 URL string. If dns is True then the scheme will be socks5h which clients use to connect with DNS resolution from the upstream SOCKS5 server.

    __enter__() -> Self

    Start the proxy and return the Proxy object.

    __exit__(exc_type, exc_value, traceback) -> None

    Stop the proxy when exiting the with block.

Metadata

Release files for slippers-proxy 0.3.0

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

Source distribution (sdist)

Source distribution for slippers-proxy 0.3.0
File Size Uploaded Provenance
slippers_proxy-0.3.0.tar.gz 5.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for slippers-proxy 0.3.0
File Interpreter ABI Platform
slippers_proxy-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / slippers_proxy-0.3.0.tar.gz

Download URL slippers_proxy-0.3.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1fe7fdcd24ed31b70af833869e7ed91d354e3cc5dbff3ce234cba2a402d33a8c
BLAKE2b-256 checksum
How to use checksums
0e1fefd560dcfeef6def8cd47392a66bf7f6e9a0d76efe5f164fe638cd7228aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.8 Darwin/24.5.0

Release files / slippers_proxy-0.3.0-py3-none-any.whl

Download URL slippers_proxy-0.3.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb8301a8a2250ef0b6a4477b24334aeca86913453f1f8c543f14c2cc44ed5e85
BLAKE2b-256 checksum
How to use checksums
a78d509f890e08c94fb11e13ef5effc03a0ec08de773f3fa39f2b25f2dae5aca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.8 Darwin/24.5.0

Security for slippers-proxy 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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