
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
v2ray2proxy
Advanced tools
đ Convert v2ray (vless://, vmess://, ss:// , trojan://) to local socks5:// & http:// proxies
Check out nichind/singbox2proxy, a similar library with better performance and more features, supporting SingBox links (hy2://, tuic://, etc.) in addition to V2Ray links, chaining support & built-in http client.
A Python library to convert V2Ray configuration links (vmess://, vless://, ss://, trojan://) to usable HTTP and SOCKS5 proxies for Python HTTP clients.
pip install v2ray2proxy
from v2ray2proxy import V2RayProxy
import requests
# Create a proxy from a V2Ray link
proxy = V2RayProxy("vmess://...")
try:
# Use with requests
proxies = {
"http": proxy.http_proxy_url,
"https": proxy.http_proxy_url
}
response = requests.get("https://api.ipify.org?format=json", proxies=proxies)
print(response.json())
finally:
# Always stop the proxy when done
proxy.stop()
import asyncio
import aiohttp
from v2ray2proxy import V2RayProxy
async def main():
# Create a proxy from a V2Ray link
proxy = V2RayProxy("vmess://...")
try:
# Use with aiohttp
async with aiohttp.ClientSession() as session:
async with session.get(
"https://api.ipify.org?format=json",
proxy=proxy.http_proxy_url
) as response:
data = await response.json()
print(data)
finally:
# Always stop the proxy when done
proxy.stop()
asyncio.run(main())
from v2ray2proxy import V2RayPool
import requests
# Create a pool with multiple proxies
links = [
"vmess://...",
"vless://...",
"trojan://..."
]
pool = V2RayPool(v2ray_links=links)
try:
# Get the fastest proxy from the pool
proxy = pool.get_fastest_proxy()
# Use the proxy
proxies = {
"http": proxy.http_proxy_url,
"https": proxy.http_proxy_url
}
response = requests.get("https://api.ipify.org?format=json", proxies=proxies)
print(response.json())
# You can also get a proxy using different strategies
# Round-robin
proxy = pool.get_proxy(strategy="round-robin")
# Random
proxy = pool.get_proxy(strategy="random")
# Get proxy URLs directly from the pool
http_url = pool.http_proxy_url()
socks5_url = pool.socks5_proxy_url()
finally:
# Always stop the pool when done
pool.stop()
# Start a proxy and print the details
python -m v2ray2proxy "vmess://..."
# Test the proxy after starting
python -m v2ray2proxy "vmess://..." --test
# Specify custom ports
python -m v2ray2proxy "vmess://..." --http-port 8080 --socks-port 1080
# Start a proxy pool with multiple instances of the same link
python -m v2ray2proxy "vmess://..." --pool --pool-size 3
vmess://... - V2Ray's VMess protocolvless://... - V2Ray's VLESS protocolss://... - Shadowsocks protocoltrojan://... - Trojan protocolfrom v2ray2proxy import V2RayProxy
# Specify custom ports
proxy = V2RayProxy(
"vmess://...",
http_port=8080,
socks_port=1080
)
from v2ray2proxy import V2RayPool
pool = V2RayPool(v2ray_links=["vmess://...", "vmess://..."])
# Check health of all proxies
health_status = pool.check_health()
print(health_status)
# Automatically restart unhealthy proxies
pool.auto_failover()
If you only want to generate the configuration without starting the proxy:
from v2ray2proxy import V2RayProxy
import json
proxy = V2RayProxy("vmess://...", config_only=True)
# Get the V2Ray configuration
config = proxy.generate_config()
print(json.dumps(config, indent=2))
# Create the config file
config_path = proxy.create_config_file()
print(f"Config file created at: {config_path}")
MIT
FAQs
đ Convert v2ray (vless://, vmess://, ss:// , trojan://) to local socks5:// & http:// proxies
We found that v2ray2proxy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.