Code Monkey home page Code Monkey logo

v2gen's Introduction

v2gen

A powerful V2Ray config generator

You can use use vmess ping instead of ICMP ping

GitHub top language Go GitHub code size in bytes

简体中文

Preview

[ 0] 中继香港C1 Media (HK)(1)      [518ms  (0 errors)]
[ 1] 中继香港C3 Media (HK)(1)      [527ms  (0 errors)]
[ 2] 中继香港C2 Media (HK)(1)      [536ms  (0 errors)]
[ 3] 中继香港C5 Media (HK)(1)      [451ms  (0 errors)]
[ 4] 中继香港C6 Media (HK)(1)      [452ms  (0 errors)]
[ 5] 中继香港G2 Media (HK)(1)      [904ms  (0 errors)]
[ 6] BGP中继香港 2 Media (HK)(1)   [468ms  (0 errors)]
[ 7] BGP中继香港 3 Media (HK)(1)   [778ms  (0 errors)]
[ 8] BGP中继香港 1 Media (HK)(1)   [881ms  (0 errors)]
[ 9] 中继香港G1 Media (HK)(1)      [1.35s  (1 errors)]
...
[50] 日本中继 3 Media (JP)(1)      [641ms  (0 errors)]
=====================
Please Select:

How to use

Build it first

go get -u iochen.com/v2gen/cmd

or Download in GitHub Releases

Then run

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

Param

Usage of v2gen:
  -best
        use best node judged by ping result
  -c string
        v2gen config path (default "/etc/v2ray/v2gen.ini")
  -ct int
        ping count for each node (default 3)
  -dest string
        test destination url (vmess ping only) (default "https://cloudflare.com/cdn-cgi/trace")
  -eto int
        timeout seconds for each request (default 8)
  -ic
        use ICMP ping instead of vmess ping
  -init
        initialize v2gen config
  -med
        use median instead of ArithmeticMean
  -n int
        node index (default -1)
  -np
        do not ping
  -o string
        output path (default "/etc/v2ray/config.json")
  -r    random node index
  -sort
        sort ping results
  -t int
        threads used when pinging (default 5)
  -tpl string
        V2Ray tpl path
  -tto int
        timeout seconds for each node (default 25)
  -u string
        subscription URL
  -v    show version
  -vmess string
        vmess link(s)

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

Version

V1.4.1

In case of any discrepancy or inconsistency between Version Number here and Tag, Tag shall prevail.

LINCENSE

MIT LICENSE

Notice

no support for version 1 format

v2gen's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.