Skip to content

MParvin/V2Check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v2c

Simple tool to test VLESS and VMess proxy links from a file and print the ones that work. Output is ready to copy into V2Ray clients (v2rayN, Nekoray, etc.).

Includes a CLI and an optional desktop GUI (v2c gui).

Requirements

  • Go 1.22+
  • Xray-core or V2Ray binary on PATH, or placed next to the built binary
  • GUI only: CGO enabled and OS graphics development packages (see Fyne getting started)

Install Xray (macOS with Homebrew):

brew install xray

Or download a release from XTLS/Xray-core releases and put the xray binary on your PATH.

Linux GUI dependencies

Fyne needs X11/Wayland and OpenGL development packages. On Fedora, for example:

sudo dnf install libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel \
  libXi-devel libXxf86vm-devel libglvnd-devel mesa-libGL-devel

On Debian/Ubuntu, see the packages listed in the Fyne Linux docs.

Build

CLI (default — no Fyne / no X11 devel packages):

go build -o v2c .

CLI + GUI (requires CGO and the Linux packages above):

go build -tags gui -o v2c .

If linking fails with cannot find -lXxf86vm, install the runtime package (libXxf86vm on Fedora). The project includes a small linker helper so the -devel package is usually not required.

Usage

CLI

v2c [flags] <proxy-file>

GUI

Build with -tags gui first, then:

v2c gui

Opens a window to pick a proxy file, set timeout/workers/core/URL, start/stop checks, view results, and save working proxies.

Flags (CLI)

Flag Default Description
-t, --timeout 15 Timeout in seconds per proxy
-w, --workers 5 Concurrent tests
--core auto Path to xray/v2ray binary
--url https://www.google.com/generate_204 URL for connectivity check
-o, --output Save working proxies to a file
-v, --verbose false Show pass/fail for each proxy
--sort-speed false Sort working proxies by connection speed (fastest first)

Input file format

One proxy URI per line. Blank lines and lines starting with # are ignored.

# my servers
vless://uuid@host:443?security=tls&type=ws&path=/&host=host#Server1
vmess://base64-encoded-json

See examples/proxies.txt.

Examples

# Test proxies and print working ones to stdout
./v2c proxies.txt

# Verbose output with per-proxy status
./v2c -v proxies.txt

# Save working proxies to a file
./v2c -o working.txt proxies.txt

# Use 10 workers and 20s timeout
./v2c -w 10 -t 20 proxies.txt

# Sort working proxies by speed (fastest first)
./v2c --sort-speed -o working.txt proxies.txt

# Open the desktop GUI
./v2c gui

Output

Working proxy URIs are printed to stdout (one per line), so you can pipe or copy them directly into your V2Ray client.

How it works

  1. Reads VLESS/VMess URIs from the input file
  2. For each proxy, starts a local Xray instance with a SOCKS inbound
  3. Sends an HTTP request through the proxy to verify connectivity
  4. Prints (and optionally saves) the URIs that succeed

License

MIT

About

A simple CLI program that checks VMESS and VLESS connections

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors

Languages