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

Only show hostnames if different from IPs #1363

Closed
fujiapple852 opened this issue Oct 27, 2024 · 0 comments · Fixed by #1364
Closed

Only show hostnames if different from IPs #1363

fujiapple852 opened this issue Oct 27, 2024 · 0 comments · Fixed by #1364
Labels
enhancement New feature or request tui
Milestone

Comments

@fujiapple852
Copy link
Owner

fujiapple852 commented Oct 27, 2024

Modify the display of the Target line in the header such that, for both the source and the destination, the hostname is only shown if it differs from the IP address.

For the destination, if the user supplies a target hostname it is resolved to an IP address and and both the IP address and provided hostname are shown. If the user supplies an IP address, a reverse DNS hostname lookup is attempted and, if successful, both the IP address and first resolved hostname are shown, otherwise only the IP address is shown.

For the source, a reverse DNS hostname lookup is attempted and if successful both the IP address and first resolved hostname are shown, otherwise only the IP address is shown.

The following is an example of the old and new Target line (for ICMP and UDP/TCP).

Old (ICMP):

trip news.ycombinator.com:

Target: 192.168.1.21 (192.168.1.21) -> news.ycombinator.com (209.216.230.207)

trip 209.216.230.207:

Target: 192.168.1.21 (192.168.1.21) -> 209.216.230.207 (209.216.230.207)

New (ICMP):

trip news.ycombinator.com:

Target: 192.168.1.21 -> 209.216.230.207 (news.ycombinator.com)

trip 209.216.230.207:

Target: 192.168.1.21 -> 209.216.230.207 (news.ycombinator.com)

Old (UDP/TCP):

trip news.ycombinator.com --udp

Target: 192.168.1.21:8342 (192.168.1.21:8342) -> news.ycombinator.com:* (209.216.230.207:*)

trip 209.216.230.207 --udp:

Target: 192.168.1.21:8342 (192.168.1.21:8342) -> 209.216.230.207:* (209.216.230.207:*)

New (UDP/TCP):

trip news.ycombinator.com --udp

Target: 192.168.1.21:8342 -> 209.216.230.207:* (news.ycombinator.com)

trip 209.216.230.207 --udp:

Target: 192.168.1.21:8342 -> 209.216.230.207:* (news.ycombinator.com)
@fujiapple852 fujiapple852 added enhancement New feature or request tui labels Oct 27, 2024
@fujiapple852 fujiapple852 added this to the 0.12.0 milestone Oct 27, 2024
@fujiapple852 fujiapple852 changed the title Only show source and target hostnames if different from IP Only show hostname if different from IP Oct 27, 2024
@fujiapple852 fujiapple852 changed the title Only show hostname if different from IP Only show Target hostnames if different from IPs Oct 27, 2024
@fujiapple852 fujiapple852 changed the title Only show Target hostnames if different from IPs Only show hostnames if different from IPs Oct 27, 2024
fujiapple852 added a commit that referenced this issue Oct 27, 2024
@fujiapple852 fujiapple852 self-assigned this Oct 27, 2024
fujiapple852 added a commit that referenced this issue Oct 27, 2024
@fujiapple852 fujiapple852 removed their assignment Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant