From 0b7d01fb21def2dfe1ec5e98602bedc2f9c9a5b4 Mon Sep 17 00:00:00 2001 From: tsosunchia <59512455+tsosunchia@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:19:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4route=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 +++++++++++----------- README_zh_CN.md | 20 ++++++++++---------- cmd/cmd.go | 5 ++++- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 8760ab2..b82cefa 100644 --- a/README.md +++ b/README.md @@ -277,8 +277,8 @@ nexttrace --data-provider IPAPI.com --max-hops 20 --tcp --port 443 --queries 5 - nexttrace -tcp --queries 2 --parallel-requests 1 --table --route-path 2001:4860:4860::8888 Equivalent to: -nexttrace -d IPAPI.com -m 20 -T -p 443 -q 5 -n 1.1.1.1 -nexttrace -T -q 2 --parallel-requests 1 -t -R 2001:4860:4860::8888 +nexttrace -d ip-api.com -m 20 -T -p 443 -q 5 -n 1.1.1.1 +nexttrace -T -q 2 --parallel-requests 1 -t -P 2001:4860:4860::8888 ``` ### IP Database @@ -304,15 +304,16 @@ Usage: nexttrace [-h|--help] [-4|--ipv4] [-6|--ipv6] [-T|--tcp] [-U|--udp] ] [--parallel-requests ] [-m|--max-hops ] [-d|--data-provider (Ip2region|ip2region|IP.SB|ip.sb|IPInfo|ipinfo|IPInsight|ipinsight|IPAPI.com|ip-api.com|IPInfoLocal|ipinfolocal|chunzhen|LeoMoeAPI|leomoeapi|disable-geoip)] - [-n|--no-rdns] [-a|--always-rdns] [-P|--route-path] - [-r|--report] [--dn42] [-o|--output] [-t|--table] [--raw] - [-j|--json] [-c|--classic] [-f|--first ] [-M|--map] + [--pow-provider (api.leo.moe|sakura)] [-n|--no-rdns] + [-a|--always-rdns] [-P|--route-path] [-r|--report] [--dn42] + [-o|--output] [-t|--table] [--raw] [-j|--json] [-c|--classic] + [-f|--first ] [-M|--map] [-e|--disable-mpls] [-v|--version] [-s|--source ""] [-D|--dev ""] - [-R|--route] [-z|--send-time ] [-i|--ttl-time - ] [--timeout ] [--psize ] - [_positionalArg_nexttrace_31 ""] [--dot-server + [-z|--send-time ] [-i|--ttl-time ] + [--timeout ] [--psize ] + [_positionalArg_nexttrace_32 ""] [--dot-server (dnssb|aliyun|dnspod|google|cloudflare)] [-g|--language - (en|cn)] + (en|cn)] [--file ""] Arguments: @@ -369,7 +370,6 @@ Arguments: -s --source Use source src_addr for outgoing packets -D --dev Use the following Network Devices as the source address in outgoing packets - -R --route Show Routing Table [Provided By BGP.Tools] -z --send-time Set how many [milliseconds] between sending each packet.. Useful when some routers use rate-limit for ICMP messages. @@ -383,7 +383,7 @@ Arguments: connection.. Default: 1000 --psize Set the packet size (payload size). Default: 52 - --_positionalArg_nexttrace_31 IP Address or domain name + --_positionalArg_nexttrace_32 IP Address or domain name --dot-server Use DoT Server for DNS Parse [dnssb, aliyun, dnspod, google, cloudflare] -g --language Choose the language for displaying [en, diff --git a/README_zh_CN.md b/README_zh_CN.md index ca77169..9543fe3 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -293,7 +293,7 @@ nexttrace -tcp --queries 2 --parallel-requests 1 --table --route-path 2001:4860: Equivalent to: nexttrace -d ip-api.com -m 20 -T -p 443 -q 5 -n 1.1.1.1 -nexttrace -T -q 2 --parallel-requests 1 -t -R 2001:4860:4860::8888 +nexttrace -T -q 2 --parallel-requests 1 -t -P 2001:4860:4860::8888 ``` ### 全部用法详见 Usage 菜单 @@ -304,15 +304,16 @@ Usage: nexttrace [-h|--help] [-4|--ipv4] [-6|--ipv6] [-T|--tcp] [-U|--udp] ] [--parallel-requests ] [-m|--max-hops ] [-d|--data-provider (Ip2region|ip2region|IP.SB|ip.sb|IPInfo|ipinfo|IPInsight|ipinsight|IPAPI.com|ip-api.com|IPInfoLocal|ipinfolocal|chunzhen|LeoMoeAPI|leomoeapi|disable-geoip)] - [-n|--no-rdns] [-a|--always-rdns] [-P|--route-path] - [-r|--report] [--dn42] [-o|--output] [-t|--table] [--raw] - [-j|--json] [-c|--classic] [-f|--first ] [-M|--map] + [--pow-provider (api.leo.moe|sakura)] [-n|--no-rdns] + [-a|--always-rdns] [-P|--route-path] [-r|--report] [--dn42] + [-o|--output] [-t|--table] [--raw] [-j|--json] [-c|--classic] + [-f|--first ] [-M|--map] [-e|--disable-mpls] [-v|--version] [-s|--source ""] [-D|--dev ""] - [-R|--route] [-z|--send-time ] [-i|--ttl-time - ] [--timeout ] [--psize ] - [_positionalArg_nexttrace_31 ""] [--dot-server + [-z|--send-time ] [-i|--ttl-time ] + [--timeout ] [--psize ] + [_positionalArg_nexttrace_32 ""] [--dot-server (dnssb|aliyun|dnspod|google|cloudflare)] [-g|--language - (en|cn)] + (en|cn)] [--file ""] Arguments: @@ -369,7 +370,6 @@ Arguments: -s --source Use source src_addr for outgoing packets -D --dev Use the following Network Devices as the source address in outgoing packets - -R --route Show Routing Table [Provided By BGP.Tools] -z --send-time Set how many [milliseconds] between sending each packet.. Useful when some routers use rate-limit for ICMP messages. @@ -383,7 +383,7 @@ Arguments: connection.. Default: 1000 --psize Set the packet size (payload size). Default: 52 - --_positionalArg_nexttrace_31 IP Address or domain name + --_positionalArg_nexttrace_32 IP Address or domain name --dot-server Use DoT Server for DNS Parse [dnssb, aliyun, dnspod, google, cloudflare] -g --language Choose the language for displaying [en, diff --git a/cmd/cmd.go b/cmd/cmd.go index 8c2954b..3d8f8be 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -59,7 +59,7 @@ func Excute() { ver := parser.Flag("v", "version", &argparse.Options{Help: "Print version info and exit"}) srcAddr := parser.String("s", "source", &argparse.Options{Help: "Use source src_addr for outgoing packets"}) srcDev := parser.String("D", "dev", &argparse.Options{Help: "Use the following Network Devices as the source address in outgoing packets"}) - router := parser.Flag("R", "route", &argparse.Options{Help: "Show Routing Table [Provided By BGP.Tools]"}) + //router := parser.Flag("R", "route", &argparse.Options{Help: "Show Routing Table [Provided By BGP.Tools]"}) packetInterval := parser.Int("z", "send-time", &argparse.Options{Default: 100, Help: "Set how many [milliseconds] between sending each packet.. Useful when some routers use rate-limit for ICMP messages"}) ttlInterval := parser.Int("i", "ttl-time", &argparse.Options{Default: 500, Help: "Set how many [milliseconds] between sending packets groups by TTL. Useful when some routers use rate-limit for ICMP messages"}) timeout := parser.Int("", "timeout", &argparse.Options{Default: 1000, Help: "The number of [milliseconds] to keep probe sockets open before giving up on the connection."}) @@ -265,6 +265,9 @@ func Excute() { PktSize: *packetSize, } + // 暂时弃用 + var router *bool + *router = false if !*tablePrint { if *classicPrint { conf.RealtimePrinter = printer.ClassicPrinter