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.0.tar.gz (5.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.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xsocks5-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for xsocks5-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b9d745d8138df77a04523256c7f03fe58b9dd68a018ac4426c51f5f3a1b13df8
MD5 68d78263e5c915def1be9e85474c5699
BLAKE2b-256 03a80f3843636fec86a0f3ebfcff1049919baee3728cf52548d5a7769e74c2cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xsocks5-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for xsocks5-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 531583229ceef1cd6e953655ad79d172265cac577763d0348097487bd2a8c0da
MD5 0fe132374c18065d21c7b387309aca80
BLAKE2b-256 460086a05f7c3cfb05ef11c51d523fd8c978eb4ecd2bb0ca433e8acc6839d3de

See more details on using hashes here.

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