NextTrace Lite的详细指南

904 阅读2分钟

NextTrace Lite

文件语言English |简体中文

一个追求轻量级的开源可视化路由工具,使用Golang开发。

NextTrace一共有2个版本,Lite版本侧重于轻量级,而Enhanced版本则更倾向于爱好者。

PS:我们的精简版不提供基于OSM的地理位置可视化,如果需要,我们会在增强版中提供这个参数。

如何使用

自动安装

# Linux one-click install script
bash <(curl -Ls https://raw.githubusercontent.com/xgadget-lab/nexttrace/main/nt_install.sh)

# macOS brew install command
brew tap xgadget-lab/nexttrace && brew install nexttrace
  • Release 自动安装提供了许多系统和架构的编译可执行文件,如果没有,你可以自己编译。
  • Windows这个项目的一些必要的依赖性在Golang 上没有完全实现,所以目前NextTraceWindows 平台上不能使用。

开始吧

NextTrace 默认使用 协议来执行TraceRoute请求,该协议同时支持 和ICMP IPv4 IPv6

# IPv4 ICMP Trace
nexttrace 1.0.0.1

# Form printing (output all hops at one time, wait 20-40 seconds)
nexttrace -table 1.0.0.1

# IPv6 ICMP Trace
nexttrace 2606:4700:4700::1111

NextTrace 现在支持快速测试,有一次性回程路由测试需求的朋友可以使用它

# IPv4 ICMP Fast Test (Beijing + Shanghai + Guangzhou + Hangzhou) in China Telecom / Unicom / Mobile / Education Network
nexttrace -f

# You can also use TCP SYN for testing
nexttrace -f -T

NextTrace 也可以使用 和 协议来执行 请求,但这些协议现在只支持TCP UDP Traceroute IPv4

# TCP SYN Trace
nexttrace -T www.bing.com

# You can specify the port by yourself [here is 443], the default port is 80
nexttrace -T -p 443 1.0.0.1

# UDP Trace
nexttrace -U 1.0.0.1

nexttrace -U -p 53 1.0.0.1

NextTrace 还支持一些高级功能,如ttl控制、并发探测包数控制、模式切换等:

# Send 2 probe packets per hop
nexttrace -q 2 www.hkix.net

# No concurrent probe packets, only one probe packet is sent at a time
nexttrace -r 1 www.hkix.net

# Start Trace with TTL of 5, end at TTL of 10
nexttrace -b 5 -m 10 www.decix.net

# Turn off the IP reverse parsing function
nexttrace -n www.bbix.net

# Feature: print Route-Path diagram
# Route-Path diagram example:
# AS6453 Tata Communication「Singapore『Singapore』」
#  ╭╯
#  ╰AS9299 Philippine Long Distance Telephone Co.「Philippines『Metro Manila』」
#  ╭╯
#  ╰AS36776 Five9 Inc.「Philippines『Metro Manila』」
#  ╭╯
#  ╰AS37963 Aliyun「ALIDNS.COM『ALIDNS.COM』」
nexttrace -report www.time.com.my

NextTrace 支持用户选择自己的IP API(目前支持: , , , , )LeoMoeAPI IP.SB IPInfo IPInsight IPAPI.com

# You can specify the IP database by yourself [IP.SB here], if not specified, LeoMoeAPI will be used
nexttrace -d IP.SB
## Note that the ipinfo API needs users to purchase services from ipinfo. If necessary, you can clone this project, add the token provided by ipinfo and compile it yourself
## Fill the token to: ipgeo/tokens.go
## Please be aware: Due to the serious abuse of IP.SB, you will often be not able to query IP data from this source
## IPAPI.com has a stricter restiction on API calls, if you can't query IP data from this source, please try again in a few minutes.

NextTrace 支持混合参数

Example:
nexttrace -d IPInsight -m 20 -p 443 -q 5 -r 20 -rdns 1.1.1.1
nexttrace -T -q 2 -r 1 -table -report 2001:4860:4860::8888

IP数据库

NextTrace BackEnd现在是开源的。

github.com/sjlleo/next…

所有NextTrace IP地理定位API DEMO ,可以参考这里

完整的使用列表,请参考使用菜单

Usage of nexttrace:
      'nexttrace [options] <hostname>' or 'nexttrace <hostname> [option...]'
Options:
  -T    Use TCP SYN for tracerouting (default port is 80)
  -U    Use UDP Package for tracerouting (default port is 53 in UDP)
  -V    Print Version
  -b int
        Set The Begin TTL (default 1)
  -d string
        Choose IP Geograph Data Provider [LeoMoeAPI, IP.SB, IPInfo, IPInsight, IPAPI.com] (default "LeoMoeAPI")
  -f    One-Key Fast Traceroute
  -m int
        Set the max number of hops (max TTL to be reached). (default 30)
  -n    Disable IP Reverse DNS lookup
  -p int
        Set SYN Traceroute Port (default 80)
  -q int
        Set the number of probes per each hop. (default 3)
  -r int
        Set ParallelRequests number. It should be 1 when there is a multi-routing. (default 18)
  -report
        Route Path
  -table
        Output trace results as table
      

NextTrace Enhanced

NextTrace Enhanced 是发烧友的增强版, ,以Web API的形式提供跟踪路由调用,以及一个简单的Looking Glass网页,内置可视化功能。Enhanced

Enhanced 版本支持许多lite 版本不具备的功能,如可以自定义超时时间,可以指定 TTL 作为路由跟踪的起点等。对于普通用户来说,lite 版本通常就足够了。

github.com/OwO-Network…

常问问题 常问问题

如果你在安装或使用时遇到问题,我们不建议你选择创建一个issue 作为优先选择

下面是我们推荐的故障排除过程:

  1. 检查它是否已经在FAQ中 ->转到Github Wiki
  2. 疑似错误或功能建议 ->转到Github问题

JetBrain支持

本项目使用JetBrain开源项目许可证,我们很自豪地通过Goland开发

GoLand logo

鸣谢

Vincent Young(i@yyt.moe)

Sam Sam(samsam123@samsam123.name.my)

tsosunchia

waiting4new

FFEE_CO

IP数据库版权

IPv4数据库

中国

ISP类型数据来源所占比例
中国电信/联通/移动骨干网互联网爱好者10%
中国电信/联通/移动当地人雅芳科技90%

世界范围内

1级
互联网公司类型数据来源所占比例
第一层主干网IPInfo2%
第1层骨干网雅芳科技3%
第1级骨干企业IPInSight5%
第1层本地IPInSight90%
一般
互联网服务提供商类型数据来源所占比例
一般骨干网IPInSight5%
一般本地IPInSight95%

IPv6数据库

ISP类型数据来源所占比例
全部全部IP2Location Lite100%

本产品包括IP2Location LITE数据,可从lite.ip2location.com。

其他

虽然本项目中集成了其他第三方API,但具体的服务条款和AUP请参考第三方API的官方网站。如果你遇到IP数据错误,请直接联系他们进行修改。

明星历史

Star History Chart