You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A powerful, high-level Python wrapper for managing and testing V2Ray/Xray-core and Hysteria clients.
8
9
9
10
This library abstracts the complexities of binary management, multi-format config parsing, and concurrent connection testing, providing a clean and streamlined API for developers.
10
11
12
+
**For full installation guides, core concepts, and the complete API reference, please visit our [full documentation site](https://arshiacomplus.github.io/docs/python-v2ray/).**
13
+
11
14
---
12
15
13
16
## ✨ Features
14
17
15
18
-**Automated Binary Management**: Automatically downloads and manages the necessary `Xray-core`, `Hysteria`, and test engine binaries for your platform (Windows, macOS, Linux).
16
-
-**Unified Config Parser**: Seamlessly parses various subscription link formats (`vless`, `vmess`, `trojan`, `ss`, `hysteria2`) into a standardized Python object model.
19
+
-**Unified Config Parser**: Seamlessly parses various subscription link formats (`vless`, `vmess`, `trojan`, `ss`, `hysteria2`, `mvless`) into a standardized Python object model.
17
20
-**High-Speed Concurrent Testing**: Utilizes a hybrid architecture (Python + Go) to test dozens of configurations simultaneously, reporting latency and connection status in seconds.
18
21
-**Dynamic Config Builder**: A fluent builder API to programmatically construct complex Xray JSON configurations with custom inbounds, outbounds, and routing rules.
19
22
-**Live Statistics**: Connect to a running Xray-core instance's gRPC API to fetch live traffic statistics (uplink & downlink).
@@ -29,7 +32,8 @@ pip install python-v2ray
29
32
30
33
## ⚡️ Quick Start: Test a List of Proxies
31
34
32
-
This example demonstrates the core functionality: downloading dependencies, parsing URIs, and running a connection test.
35
+
This example demonstrates the core functionality: downloading dependencies, parsing URIs, and running a connection test. For more advanced examples, please see our [full documentation](https://arshiacomplus.github.io/docs/python-v2ray/).
36
+
33
37
34
38
```python
35
39
from pathlib import Path
@@ -97,44 +101,6 @@ if __name__ == "__main__":
97
101
run_tests()
98
102
```
99
103
100
-
## 🏛 Architecture: The Best of Python & Go
101
-
102
-
`python-v2ray` employs a hybrid architecture for maximum efficiency:
103
-
104
-
-**Python Orchestrator**: The high-level logic, config management, binary downloading, and process orchestration are handled in Python for its readability and flexibility.
105
-
-**Go Test Engine**: Performance-critical network operations, such as concurrent TCP/SOCKS dialing and latency tests, are delegated to a compiled Go binary (`core_engine`).
106
-
107
-
Communication between the two layers is achieved via IPC (`stdin`/`stdout`) with a simple JSON-based protocol. This design combines the development speed of Python with the raw network performance of Go.
108
-
109
-
## 🛠 Advanced Usage: Running a Single Proxy
110
-
111
-
```python
112
-
from python_v2ray.core import XrayCore
113
-
from python_v2ray.config_parser import parse_uri, XrayConfigBuilder
114
-
115
-
# Your target proxy URI
116
-
uri ="vless://YOUR_UUID@your.domain.com:443?security=tls&sni=your.domain.com#MyProxy"
0 commit comments