Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Handle NAT64 address query #200

Merged
merged 1 commit into from
Dec 30, 2024
Merged

feat: Handle NAT64 address query #200

merged 1 commit into from
Dec 30, 2024

Conversation

cyyself
Copy link
Contributor

@cyyself cyyself commented Dec 29, 2024

We can query the NAT64 address by the IPv4 address part of the NAT64 address. This is useful when we want to know the NAT64 address of a specific IPv4 address. We also add a new regex pattern to match the NAT64 address like 64:ff9b::1.1.1.1 .

Before this commit:

                                                 My traceroute  [v0.95]
Yangyus-MBP.lan (2408:8207:18a2:5d10:470:d854:5e42:5c6a [中国 北京市 海淀区 中国联通公众宽带] ) -> 64:ff9b::8 [IANA特殊地址 包含v4地址的v6地址] .8.8.8 (64:ff9b::808:808 [IANA特殊地址 包含v4地址的v6地址] )2024-12-29T20:21:47+0800
Keys:  Help   Display mode   Restart statistics   Order of fields   quit                             Pings
 Host                                                                        Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 2408:8207:18a2:5d10::1 [中国  北京市 海淀区 中国联通公众宽带]      0.0%     5    0.9   1.0   0.7   1.8   0.4
 2. (waiting for reply)
 3. 64:ff9b::c0a8:a401 [IANA特殊地址 包含v4地址的v6地址]                      0.0%     5    2.2   1.6   1.3   2.2   0.4
 4. 64:ff9b::72fd:f001 [IANA特殊地址 包含v4地址的v6地址]                      0.0%     5    9.8   6.5   4.4   9.8   2.4
 5. (waiting for reply)
 6. (waiting for reply)
 7. (waiting for reply)
 8. 64:ff9b::db9e:876 [IANA特殊地址 包含v4地址的v6地址]                       0.0%     5   39.8  41.3  39.8  42.7   1.3
 9. 64:ff9b::db9e:6726 [IANA特殊地址 包含v4地址的v6地址]                      0.0%     5   39.6  41.6  38.6  45.1   2.6
10. 64:ff9b::db9e:36a [IANA特殊地址 包含v4地址的v6地址]                      20.0%     5   40.7  39.8  38.7  40.7   0.8
11. (waiting for reply)
12. 64:ff9b::a2f5:7cfe [IANA特殊地址 包含v4地址的v6地址]                      0.0%     4   48.8  46.5  42.3  48.8   3.0
13. 64:ff9b::cb83:f1dc [IANA特殊地址 包含v4地址的v6地址]                     25.0%     4  138.1 133.4 131.0 138.1   4.1
14. 64:ff9b::cb83:fa52 [IANA特殊地址 包含v4地址的v6地址]                      0.0%     4   42.8  43.1  42.2  44.9   1.2
15. 64:ff9b::6caa:e713 [IANA特殊地址 包含v4地址的v6地址]                      0.0%     4   40.4  40.0  39.4  40.4   0.5
16. 64:ff9b::8efa:d093 [IANA特殊地址 包含v4地址的v6地址]                      0.0%     4   41.3  44.1  39.4  51.3   5.2
17. 64:ff9b::808:808 [IANA特殊地址 包含v4地址的v6地址]                        0.0%     4   39.8  40.6  39.8  41.7   0.9

After this commit:

                                                 My traceroute  [v0.95]
Yangyus-MBP.lan (2408:8207:18a2:5d10:470:d854:5e42:5c6a [中国	北京市	海淀区 中国联通公众宽带] ) -> 64:ff9b::8.8.8.8 [美国–加利福尼亚州–圣克拉拉–山景城 谷歌公司DNS服务器]  (64:ff9b::808:808 [美国–加利福尼亚州–圣克拉拉–山景城 谷歌公司DNS服务器] )2024-12-29T20:22:06+0800                                                                      Pings
 Host  Help   Display mode   Restart statistics   Order of fields   quit     Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 2408:8207:18a2:5d10::1 [中国	北京市	海淀区 中国联通公众宽带]                  0.0%     5    1.2   1.0   0.6   1.2   0.2
 2. (waiting for reply)
 3. 64:ff9b::c0a8:a401 [局域网 对方和您在同一内部网]                               0.0%     5    1.3   1.4   1.3   1.6   0.1
 4. 64:ff9b::72fd:f001 [中国–北京–北京 联通]                                     0.0%     5    7.5   5.7   5.0   7.5   1.0
 5. (waiting for reply)
 6. (waiting for reply)
 7. (waiting for reply)
 8. 64:ff9b::db9e:876 [中国–广东–广州 联通/中国联通骨干网广东节点(AS4837)]           0.0%     4   38.1  38.6  37.4  39.8   1.1
 9. 64:ff9b::db9e:6726 [中国–广东–广州 联通/骨干网节点]                            0.0%     4   44.0  43.2  39.1  45.4   2.8
10. 64:ff9b::db9e:36a [中国 联通骨干网]                                         25.0%     4   40.7  40.2  39.9  40.7   0.5
11. (waiting for reply)
12. 64:ff9b::a2f5:7cfe [中国–香港 中国联通国际互联节点]                            0.0%     4   42.7  46.3  42.7  51.9   3.9
13. 64:ff9b::cb83:f1dc [中国–香港 NTT亚洲公司互联节点]                            0.0%     4  130.9 134.3 130.8 141.2   6.0
14. 64:ff9b::cb83:fa52 [中国–香港 NTT亚洲公司互联节点]                            0.0%     4   42.1  44.9  42.1  52.9   5.3
15. 64:ff9b::6caa:e713 [美国–加利福尼亚州–圣克拉拉–山景城 谷歌公司]                 25.0%     4   40.6  40.4  40.1  40.6   0.2
16. 64:ff9b::8efa:d093 [美国–加利福尼亚州–圣克拉拉–山景城 谷歌公司]                  0.0%     4   41.2  43.6  40.9  51.2   5.1
17. 64:ff9b::808:808 [美国–加利福尼亚州–圣克拉拉–山景城 谷歌公司DNS服务器]            0.0%     4   40.1  43.0  40.1  50.4   5.0

We can query the NAT64 address by the IPv4 address part of the NAT64
address. This is useful when we want to know the NAT64 address of a
specific IPv4 address. We also add a new regex pattern to match the
NAT64 address like 64:ff9b::1.1.1.1 .

Signed-off-by: Yangyu Chen <[email protected]>
@zu1k
Copy link
Owner

zu1k commented Dec 30, 2024

LGTM, thanks!

@zu1k zu1k merged commit 8c17abb into zu1k:master Dec 30, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants