mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2025-08-12 06:26:39 +00:00
修改输出提示,显示为当前真实的maxhops设置
之前无论maxhops设置为多少,都输出为 30 hops max
This commit is contained in:
@@ -155,7 +155,7 @@ func Excute() {
|
||||
}
|
||||
}
|
||||
|
||||
printer.PrintTraceRouteNav(ip, domain, *dataOrigin)
|
||||
printer.PrintTraceRouteNav(ip, domain, *dataOrigin, *maxHops)
|
||||
|
||||
var m trace.Method = ""
|
||||
|
||||
|
||||
@@ -61,12 +61,12 @@ func PluginCopyRight() {
|
||||
)
|
||||
}
|
||||
|
||||
func PrintTraceRouteNav(ip net.IP, domain string, dataOrigin string) {
|
||||
func PrintTraceRouteNav(ip net.IP, domain string, dataOrigin string, maxHops int) {
|
||||
fmt.Println("IP Geo Data Provider: " + dataOrigin)
|
||||
|
||||
if ip.String() == domain {
|
||||
fmt.Printf("traceroute to %s, 30 hops max, 32 byte packets\n", ip.String())
|
||||
fmt.Printf("traceroute to %s, %d hops max, 32 byte packets\n", ip.String(), maxHops)
|
||||
} else {
|
||||
fmt.Printf("traceroute to %s (%s), 30 hops max, 32 byte packets\n", ip.String(), domain)
|
||||
fmt.Printf("traceroute to %s (%s), %d hops max, 32 byte packets\n", ip.String(), domain, maxHops)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user