Skip to main content

A SOCKS5 proxy

Project description

xsocks5

一个基于Python asyncio的轻量级SOCKS5代理服务器,支持用户名密码认证。

使用方法

安装

# 使用pip安装
pip install xsocks5

启动代理服务器

# 使用默认参数启动
xsocks5

# 自定义参数启动
xsocks5 --host 0.0.0.0 --port 1080 --username myuser --password mypass

参数说明

  • --host: 服务器监听地址,默认为 0.0.0.0
  • --port: 服务器监听端口,默认为 1080
  • --username: 认证用户名,默认为 admin
  • --password: 认证密码,默认为 admin

客户端配置

在需要使用代理的应用程序中配置以下信息:

  • 代理类型:SOCKS5
  • 服务器地址:代理服务器所在的主机IP
  • 端口:与启动时指定的端口一致(默认1080)
  • 用户名:与启动时指定的用户名一致(默认admin)
  • 密码:与启动时指定的密码一致(默认admin)

开发

项目结构

socks5/
├── src/
│   └── xsocks5/
│       ├── __init__.py
│       └── main.py
├── tests/
│   ├── __init__.py
│   └── test_main.py
├── pyproject.toml
└── README.md

开发环境设置

# 安装uv
## On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
## On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# 克隆仓库
git clone https://github.com/Simple-Creator/socks5-python.git
cd socks5-python

# 使用uv创建虚拟环境并安装依赖
uv sync

功能特点

  • 基于Python asyncio实现的高性能异步代理服务器
  • 支持SOCKS5协议
  • 支持用户名密码认证
  • 支持IPv4、IPv6和域名目标地址
  • 简单易用的命令行接口

许可证

MIT License

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

xsocks5-0.1.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xsocks5-0.1.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file xsocks5-0.1.2.tar.gz.

File metadata

  • Download URL: xsocks5-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xsocks5-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6549d363a9ed7c72ae1fcfb9e93eefcc48baa9e6de7b283fde82867d578ebe4b
MD5 02f6c6cb8dd2557752f0bafe54be0518
BLAKE2b-256 1789dcdb2bfb49ef8871aa9b0b1a011fc3860fd134e299eeeca70c635a29e710

See more details on using hashes here.

Provenance

The following attestation bundles were made for xsocks5-0.1.2.tar.gz:

Publisher: python-publish.yml on Simple-Creator/socks5-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xsocks5-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: xsocks5-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xsocks5-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a768b1f77e4a5eb5763053b9b4dba9457b195ac116a6ba9355b494b7d979fdf
MD5 f20c7b7d929f08591873d33c349da336
BLAKE2b-256 02ea0dbde9d52c1cbd4c080edbacd04369b82575e374044f331f3820c86c29ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for xsocks5-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on Simple-Creator/socks5-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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