Skip to content

lixiangzhong/traceroute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

traceroute

golang traceroute

####需要ROOT权限运行

package main

import (
	"fmt"
	"github.com/lixiangzhong/traceroute"
)

func main() {
	t := traceroute.New("qq.com")
	//t.MaxTTL=30
	//t.Timeout=3 * time.Second
	//t.LocalAddr="0.0.0.0"
	result, err := t.Do()
	if err != nil {
		fmt.Println(err)
		return
	}
	for _, v := range result {
		fmt.Println(v)
	}
}

About

golang traceroute

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages