Skip to main content

A Python package to manage v2ray with native extensions

Project description

V2Root

A Python package to manage V2Ray proxy configurations with native extensions.

V2Root provides a Python interface to interact with the V2Ray proxy software using a custom C library (libv2root.dll on Windows, libv2root.so on Linux). It allows users to load configurations, start/stop V2Ray, test connections, and parse VLESS, VMess, and Shadowsocks strings into V2Ray-compatible config files.

Features

  • Load and validate V2Ray configuration files
  • Start and stop V2Ray processes
  • Test server connections with ping and protocol-specific tests
  • Parse VLESS, VMess, and Shadowsocks strings into V2Ray-compatible JSON configs
  • Cross-platform support for Windows and Linux
  • Comprehensive documentation with examples and troubleshooting

Installation

Install via pip:

pip install v2root

Usage

Basic example to start V2Ray with a VLESS configuration:

from v2root import V2ROOT

# Initialize V2ROOT
v2 = V2ROOT()

# Set a VLESS string
vless_str = "vless://your-uuid@your-server:443?security=tls&type=tcp"
v2.start_proxy(vless_str, http_port=10808, socks_port=1080)

# Stop V2Ray when done
v2.stop_proxy()

Requirements

  • Python 3.6 or higher
  • V2Ray executable (v2ray.exe on Windows, v2ray on Linux)
  • Windows or Linux OS
  • Standard libraries: ctypes, urllib.request, colorama

Documentation

Detailed documentation, including installation instructions, usage examples, and supported configuration options, is available at: Read the Docs

License

This project is licensed under the MIT License - see the file for details.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes. See the Contributing Guide for more details.

What's New

  • Added support for VMess and Shadowsocks protocols
  • Introduced Linux support with libv2root.so
  • Enhanced documentation with quick start guide, advanced examples, and troubleshooting

Support

If you encounter any issues or have questions, feel free to open an issue on the GitHub repository or join our Support Channel.

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

v2root-1.1.0.tar.gz (19.3 MB view details)

Uploaded Source

Built Distribution

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

v2root-1.1.0-py3-none-any.whl (19.5 MB view details)

Uploaded Python 3

File details

Details for the file v2root-1.1.0.tar.gz.

File metadata

  • Download URL: v2root-1.1.0.tar.gz
  • Upload date:
  • Size: 19.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for v2root-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2fed43e7caa644e96faa3d061141efafe532c8215e762c6b9d4dcb82b52591f9
MD5 794ccbd00e9e292a548a117af24fb84f
BLAKE2b-256 da1b469c7acf98d16d317523173cbf79bdaec95ce851dbfb4ce7b656f4f6a22d

See more details on using hashes here.

File details

Details for the file v2root-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: v2root-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for v2root-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcfc873684c21801ff7fb0f44415289758e4d2c1e418f1ec4267af8983ff0275
MD5 513d405c07dfd280c45d624ba1f79b80
BLAKE2b-256 72f5563d87084acb6d1bdd81efadfd7c75805dfcd422a4b508602baa0f647572

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