Skip to main content

V2Kit: A Lightweight Toolkit for V2Ray Config Manipulation

Project description

V2Kit: A Lightweight Toolkit for V2Ray Config Manipulation


built with Python3 GitHub repo size PyPI version

Overview

V2Kit is a lightweight and extensible Python toolkit for working with V2Ray proxy configurations and subscriptions. It provides a clean API for common operations such as protocol detection, configuration validation, config relabeling, and subscription encoding/decoding. The project is designed with simplicity, predictability, and composability in mind, making it suitable for automation scripts, proxy pipelines, networking tools, and future extensions around V2Ray ecosystem utilities.

PyPI Counter
Github Stars
Branch main dev
CI
Code Quality CodeFactor

Installation

Source Code

PyPI

Supported Protocols

V2Kit currently supports the following protocols:

Protocol Detection Parsing Relabeling Config Model
VMESS
VLESS
Trojan
Shadowsocks
SOCKS
HTTP

Usage

URI Utilities

from v2kit import (
    decode_subscription,
    encode_subscription,
    is_vmess,
    parse,
    relabel,
)

uri = "vmess://eyJhZGQiOiIxMjcuMC4wLjEiLCJwcyI6Im9sZCJ9"

new_uri = relabel(uri, "Germany-1")

if is_vmess(new_uri):
    print("VMESS URI detected")

config = parse(new_uri)

config.update_label("Germany-2")

subscription = encode_subscription([config])

uris = decode_subscription(subscription)

Configs

from v2kit import VMESSConfig

config = VMESSConfig(
    uuid="550e8400-e29b-41d4-a716-446655440000",
    address="example.com",
    port=443,
    label="Germany-1",
)

uri = config.to_uri()

Issues & Bug Reports

Just fill an issue and describe it. We'll check it ASAP!

  • Please complete the issue template

Show Your Support

Star This Repo

Give a ⭐️ if this project helped you!

Donate to Our Project

Bitcoin

1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCy

Ethereum

0xcD4Db18B6664A9662123D4307B074aE968535388

Litecoin

Ldnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZ

Doge

DDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDh

Tron

TCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7

Ripple

rN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qq

Binance Coin

bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qef

Tether

0xcD4Db18B6664A9662123D4307B074aE968535388

Dash

Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3s

Stellar

GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL

Zilliqa

zil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5

Coffeete

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

0.4 - 2026-07-02

Added

  • HttpConfig class

Changed

  • parse function modified
  • README.md updated
  • Test system modified

0.3 - 2026-06-16

Added

  • Logo
  • SocksConfig class
  • is_socks function

Changed

  • README.md updated
  • Test system modified
  • Dependencies structure modified
  • All config models moved to models folder

0.2 - 2026-06-04

Added

  • VMESSConfig class
  • VLESSConfig class
  • TrojanConfig class
  • ShadowsocksConfig class
  • V2kitError class
  • V2kitValidationError class
  • V2kitParseError class
  • parse function

Changed

  • README.md updated
  • Test system modified
  • is_vmess function config parameter renamed to uri
  • is_vless function config parameter renamed to uri
  • is_trojan function config parameter renamed to uri
  • is_shadowsocks function config parameter renamed to uri
  • encode_subscription function configs parameter renamed to entries

0.1 - 2026-05-16

Added

  • is_vmess function
  • is_vless function
  • is_trojan function
  • is_shadowsocks function
  • relabel function
  • encode_subscription function
  • decode_subscription function

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

v2kit-0.4.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

v2kit-0.4-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file v2kit-0.4.tar.gz.

File metadata

  • Download URL: v2kit-0.4.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for v2kit-0.4.tar.gz
Algorithm Hash digest
SHA256 6f55308a880a182f8a885bf3d4bac4af5e9b89a878dc7da549da444eb3803382
MD5 cdc7736330763c769d25660ae40f7817
BLAKE2b-256 500506293290c072b414418f82bf9997bbae583587be984a6891e582352574fe

See more details on using hashes here.

File details

Details for the file v2kit-0.4-py3-none-any.whl.

File metadata

  • Download URL: v2kit-0.4-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for v2kit-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7a33ea686519ebcb482d319f8f4b26def32232d64a8c046e93c790f36822ae98
MD5 8c02eab5a4f7db04296c785cf16ee37c
BLAKE2b-256 f3f9448435a07c07e78d2b0f6648930e0d8f18c0939b89cc014b0f20b827119f

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