Archeb / opentrace

A cross-platform GUI wrapper for NextTrace. Bringing you the familiar traceroute experience. OpenTrace 是 NextTrace 的跨平台 GUI 界面,带来您熟悉但更强大的用户体验。
GNU General Public License v3.0
2.2k stars 88 forks source link

[BUG] 第一跳主机名显示不全 #47

Closed wwng2333 closed 9 months ago

wwng2333 commented 9 months ago

Describe the bug 描述你遇到的BUG 我的第一跳主机名是smartdns,但是程序中只显示smartdn,拉宽那一列也无法显示完全,其他正常

To Reproduce 复现方法 no idea

Screenshots (If applicable) 截图(如果有) image

Environment 使用环境

Additional context 补充说明 下面是使用nexttrace的结果,可以看到nexttrace解析不出来主机名

./nexttrace.exe 223.6.6.6
NextTrace v1.2.7 2023-12-01T08:40:30Z c0455ca
[NextTrace API] preferred API IP - [2605:52c0:2:954::] - 534.20ms - DMIT.LAX
IP Geo Data Provider: LeoMoeAPI
traceroute to 223.6.6.6, 30 hops max, 52 bytes packets
1   192.168.123.1   *                         RFC1918
                                              2.57 ms / 1.36 ms / 1.61 ms
2   *
3   122.193.94.49   AS4837   [UNICOM-JS]      中国 江苏省 苏州市 常熟 chinaunicom.cn  联通
                                              4.51 ms / 6.44 ms / 4.51 ms
4   58.240.200.61   AS4837                    中国 江苏省 苏州市 姑苏 chinaunicom.cn  联通
                                              8.79 ms / 115.96 ms / * ms
5   219.158.111.85  AS4837   [CU169-BACKBONE] 中国 北京市   chinaunicom.cn  联通
                                              25.61 ms / * ms / * ms
6   *
7   125.33.185.118  AS4808   [UNICOM-BJ]      中国 北京市   chinaunicom.cn  联通
                                              24.37 ms / * ms / * ms
8   61.49.143.2     AS4808                    中国 北京市   chinaunicom.cn  联通
                                              138.40 ms / * ms / * ms
9   *
10  *
11  *
12  *
13  223.6.6.6       AS45102  [ALISOFT]        中国    alibabagroup.com
    public2.alidns.com                        29.20 ms / 28.67 ms / 29.14 ms
MapTrace URL: https://assets.nxtrace.org/tracemap/9b824c5d-028b-51e9-a513-b72c7a4af0a1.html

cmd nslookup显示主机名正常:

C:\Users\Administrator>nslookup
默认服务器:  smartdns
Address:  192.168.123.1

> 1.1.1.1
服务器:  smartdns
Address:  192.168.123.1

名称:    one.one.one.one
Address:  1.1.1.1
tsosunchia commented 9 months ago

并不是这样的, nexttrace不会长时间等待返回ptr, 所以出现了这种情况

tsosunchia commented 9 months ago

./nexttrace.exe 223.6.6.6 -a

你可以观察一下输出

wwng2333 commented 9 months ago

./nexttrace.exe 223.6.6.6 -a

你可以观察一下输出

-a以后输出正常

nexttrace.exe 223.6.6.6 -a
NextTrace v1.2.7 2023-12-01T08:40:30Z c0455ca
[NextTrace API] preferred API IP - [2605:52c0:2:954::] - 533.83ms - DMIT.LAX
IP Geo Data Provider: LeoMoeAPI
traceroute to 223.6.6.6, 30 hops max, 52 bytes packets
1   192.168.123.1   *                         RFC1918
    smartdns                                  1.74 ms / 1.39 ms / 1.41 ms
2   *
3   122.193.94.49   AS4837   [UNICOM-JS]      中国 江苏省 苏州市 常熟 chinaunicom.cn  联通
                                              4.52 ms / 4.51 ms / 5.48 ms
4   58.240.200.61   AS4837                    中国 江苏省 苏州市 姑苏 chinaunicom.cn  联通
                                              8.60 ms / 8.88 ms / * ms
5   219.158.111.85  AS4837   [CU169-BACKBONE] 中国 北京市   chinaunicom.cn  联通
                                              26.37 ms / * ms / * ms
6   *
7   *
8   61.49.143.2     AS4808                    中国 北京市   chinaunicom.cn  联通
                                              245.97 ms / * ms / * ms
9   *
10  *
11  *
12  *
13  223.6.6.6       AS45102  [ALISOFT]        中国    alibabagroup.com
    public2.alidns.com.                       29.24 ms / 29.01 ms / 29.02 ms
tsosunchia commented 9 months ago

./nexttrace.exe 223.6.6.6 -a 你可以观察一下输出

-a以后输出正常

nexttrace.exe 223.6.6.6 -a
NextTrace v1.2.7 2023-12-01T08:40:30Z c0455ca
[NextTrace API] preferred API IP - [2605:52c0:2:954::] - 533.83ms - DMIT.LAX
IP Geo Data Provider: LeoMoeAPI
traceroute to 223.6.6.6, 30 hops max, 52 bytes packets
1   192.168.123.1   *                         RFC1918
    smartdns                                  1.74 ms / 1.39 ms / 1.41 ms
2   *
3   122.193.94.49   AS4837   [UNICOM-JS]      中国 江苏省 苏州市 常熟 chinaunicom.cn  联通
                                              4.52 ms / 4.51 ms / 5.48 ms
4   58.240.200.61   AS4837                    中国 江苏省 苏州市 姑苏 chinaunicom.cn  联通
                                              8.60 ms / 8.88 ms / * ms
5   219.158.111.85  AS4837   [CU169-BACKBONE] 中国 北京市   chinaunicom.cn  联通
                                              26.37 ms / * ms / * ms
6   *
7   *
8   61.49.143.2     AS4808                    中国 北京市   chinaunicom.cn  联通
                                              245.97 ms / * ms / * ms
9   *
10  *
11  *
12  *
13  223.6.6.6       AS45102  [ALISOFT]        中国    alibabagroup.com
    public2.alidns.com.                       29.24 ms / 29.01 ms / 29.02 ms

是的,-a参数会使nexttrace长时间等待ptr,一般家用路由器都会遇到这种问题,响应ptr过慢

tsosunchia commented 9 months ago

@Archeb 可以考虑一下,把preference中的禁用反向DNS查询改为菜单按钮,这样可以让用户选择 null/-n/-a

wwng2333 commented 9 months ago

./nexttrace.exe 223.6.6.6 -a 你可以观察一下输出

-a以后输出正常

nexttrace.exe 223.6.6.6 -a
NextTrace v1.2.7 2023-12-01T08:40:30Z c0455ca
[NextTrace API] preferred API IP - [2605:52c0:2:954::] - 533.83ms - DMIT.LAX
IP Geo Data Provider: LeoMoeAPI
traceroute to 223.6.6.6, 30 hops max, 52 bytes packets
1   192.168.123.1   *                         RFC1918
    smartdns                                  1.74 ms / 1.39 ms / 1.41 ms
2   *
3   122.193.94.49   AS4837   [UNICOM-JS]      中国 江苏省 苏州市 常熟 chinaunicom.cn  联通
                                              4.52 ms / 4.51 ms / 5.48 ms
4   58.240.200.61   AS4837                    中国 江苏省 苏州市 姑苏 chinaunicom.cn  联通
                                              8.60 ms / 8.88 ms / * ms
5   219.158.111.85  AS4837   [CU169-BACKBONE] 中国 北京市   chinaunicom.cn  联通
                                              26.37 ms / * ms / * ms
6   *
7   *
8   61.49.143.2     AS4808                    中国 北京市   chinaunicom.cn  联通
                                              245.97 ms / * ms / * ms
9   *
10  *
11  *
12  *
13  223.6.6.6       AS45102  [ALISOFT]        中国    alibabagroup.com
    public2.alidns.com.                       29.24 ms / 29.01 ms / 29.02 ms

是的,-a参数会使nexttrace长时间等待ptr,一般家用路由器都会遇到这种问题,响应ptr过慢

我用wireshark抓到opentrace获得的ptr结果是正常的,只是显示的不对,不显示最后一个字符 image

tsosunchia commented 9 months ago

./nexttrace.exe 223.6.6.6 -a 你可以观察一下输出

-a以后输出正常

nexttrace.exe 223.6.6.6 -a
NextTrace v1.2.7 2023-12-01T08:40:30Z c0455ca
[NextTrace API] preferred API IP - [2605:52c0:2:954::] - 533.83ms - DMIT.LAX
IP Geo Data Provider: LeoMoeAPI
traceroute to 223.6.6.6, 30 hops max, 52 bytes packets
1   192.168.123.1   *                         RFC1918
    smartdns                                  1.74 ms / 1.39 ms / 1.41 ms
2   *
3   122.193.94.49   AS4837   [UNICOM-JS]      中国 江苏省 苏州市 常熟 chinaunicom.cn  联通
                                              4.52 ms / 4.51 ms / 5.48 ms
4   58.240.200.61   AS4837                    中国 江苏省 苏州市 姑苏 chinaunicom.cn  联通
                                              8.60 ms / 8.88 ms / * ms
5   219.158.111.85  AS4837   [CU169-BACKBONE] 中国 北京市   chinaunicom.cn  联通
                                              26.37 ms / * ms / * ms
6   *
7   *
8   61.49.143.2     AS4808                    中国 北京市   chinaunicom.cn  联通
                                              245.97 ms / * ms / * ms
9   *
10  *
11  *
12  *
13  223.6.6.6       AS45102  [ALISOFT]        中国    alibabagroup.com
    public2.alidns.com.                       29.24 ms / 29.01 ms / 29.02 ms

是的,-a参数会使nexttrace长时间等待ptr,一般家用路由器都会遇到这种问题,响应ptr过慢

我用wireshark抓到opentrace获得的ptr结果是正常的,只是显示的不对,不显示最后一个字符 image

这不是opentrace的问题,这是nexttrace这里处理的特性

tsosunchia commented 9 months ago

作为一个临时的解决办法,你可以在preference中 “附加参数” 中填写 -a

wwng2333 commented 9 months ago

作为一个临时的解决办法,你可以在preference中 “附加参数” 中填写 -a

添加-a之后问题解决 image

Archeb commented 8 months ago

@Archeb 可以考虑一下,把preference中的禁用反向DNS查询改为菜单按钮,这样可以让用户选择 null/-n/-a

已添加 9835e3d10d4d6cd84f1fb6c0cf705912c09baf4d

wwng2333 commented 8 months ago

@Archeb 可以考虑一下,把preference中的禁用反向DNS查询改为菜单按钮,这样可以让用户选择 null/-n/-a

已添加 9835e3d

image

测试ok