vmessping

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 4 Imported by: 3

README

vmessping

Build Status

A ping prober for vmess:// links in common seen formats.

vmessping supports the following fomats:

  • V2rayN (V2rayNG)
  • Shadowrocket
  • Quantumult (X)
./vmessping vmess://....
Usage of ./vmessping:
  -c uint
        Count. Stop after sending COUNT requests (default 9999)
  -dest string
        the test destination url, need 204 for success return (default "http://www.google.com/gen_204")
  -i uint
        inteval seconds between pings (default 1)
  -o uint
        timeout seconds for each request (default 10)
  -v    verbose (debug log)

Example

./vmessping -c 3 vmess://12345678.......

Vmessping [0.0.0-src] Yet another distribution of v2ray (v2ray-core: 4.21.3)
PING  tcp|my.server.domian|4321  (ps/name)

2019/12/20 15:56:09 Get http://www.google.com/gen_204: net/http: request canceled ...
Ping http://www.google.com/gen_204: seq=1 time=-1 ms
Ping http://www.google.com/gen_204: seq=2 time=490 ms
Ping http://www.google.com/gen_204: seq=3 time=396 ms

--- http://www.google.com/gen_204 vmess ping statistics ---
3 requests made, 2 success, time 6.886747334s
rtt min/avg/max = 396/443.00/490 ms

Compile from source

go get -v github.com/v2fly/vmessping/cmd/...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintVersion

func PrintVersion(mv string)

Types

type PingStat added in v0.1.0

type PingStat struct {
	StartTime  time.Time
	SumMs      uint
	MaxMs      uint
	MinMs      uint
	AvgMs      uint
	Delays     []int64
	ReqCounter uint
	ErrCounter uint
}

func Ping

func Ping(vmess string, count uint, dest string, timeoutsec, inteval, quit uint, stopCh <-chan os.Signal, showNode, verbose bool) (*PingStat, error)

func (*PingStat) CalStats added in v0.1.0

func (p *PingStat) CalStats()

func (PingStat) IsErr added in v0.1.0

func (p PingStat) IsErr() bool

func (PingStat) PrintStats added in v0.1.0

func (p PingStat) PrintStats()

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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