v2gen

package module
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 2 Imported by: 1

README

v2gen

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Config() map[string]string
}
type Link interface {
	fmt.Stringer
	Ping(round int, dst string) (ping.Status, error)
	DestAddr() string
	Description() string
	Safe() string
	Config
}

Directories

Path Synopsis
cmd
common

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL