Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.
/ v2gen Public archive

A powerful cross-platform CLI client for V2Ray subscription. 跨平台V2Ray命令行订阅管理客户端

License

Notifications You must be signed in to change notification settings

rikkix/v2gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v2gen

- The project will no longer be supported, please use other alternatives instead.
- 该项目不再受支持,建议使用其它替代品

A powerful V2Ray config generator

You can use use vmess ping instead of ICMP ping

go.dev reference GitHub top language GitHub code size in bytes Go

简体中文

Preview

[ 0] Server A      [451ms  (0 errors)]
[ 1] Server B      [452ms  (0 errors)]
[ 3] Server C      [251ms  (0 errors)]
...
[25] Server Z      [652ms  (2 errors)]
=====================
Please Select:

Build or Download

git clone https://github.com/iochen/v2gen/ && cd v2gen
env GOPRIVATE=github.com/v2ray/v2ray-core go build ./cmd/v2gen

or Download in GitHub Releases

Quick start

v2gen -u {{Your subscription link}} -o {{Your V2Ray config path}}

Param

Usage of ./v2gen:
  -best
        use best node judged by ping result
  -c int
        ping count for each node (default 3)
  -config string
        v2gen config path (default "/etc/v2ray/v2gen.ini")
  -dst string
        test destination url (vmess ping only) (default "https://cloudflare.com/cdn-cgi/trace")
  -init
        init v2gen config (specify certain path with -config)
  -log string
        log output file (default "-")
  -loglevel string
        log level (default "warn")
  -o string
        output path (default "/etc/v2ray/config.json")
  -ping
        ping nodes (default true)
  -pipe
        read from pipe (default true)
  -random
        random node index
  -template string
        V2Ray template path
  -thread int
        threads used when pinging (default 3)
  -u string
        subscription address(URL)
  -v    show version

V2Gen user config

You can use v2gen --init to generate one

# V2Ray log level
# ( debug | info | warning | error | none )
loglevel: warning

# Socks port
socksPort: 1080

# Http port
httpPort: 1081

# If allow UDP traffic
# ( true | false )
udp: true

# Security
# ( aes-128-gcm | aes-256-gcm | chacha20-poly1305 | auto | none )
security: aes-256-gcm

# If enable mux
# ( true | false )
mux: true

# Mux concurrency num
concurrency: 8

# DNS server
dns1: https://1.1.1.1/dns-query
dns2: https://dns.quad9.net/dns-query

# If China sites and ips directly connect
# ( true | false )
china: true

The following config may NOT work on every node

# If allow insecure connection ( true | false )
allowInsecure: false

# KCP mtu num
mtu: 1350

# KCP tti num
tti: 20

# KCP max upload speed
# Unit: MB/s
up: 5

# KCP max download speed
# Unit: MB/s
down: 20

# If enable UDP congestion control ( true | false )
congestion: false

# Read buffer size
# Unit: MB
readBufferSize: 1

# Write buffer size
# Unit: MB
writeBufferSize: 1

LINCENSE

MIT LICENSE