This commit introduces the --me flag, which allows users to quickly display their current local IPv4 and public IPv4/IPv6 addresses. The public IPs are retrieved using ifconfig.me via curl, ensuring accurate detection even in CGNAT or split-DNS scenarios. Local IPv4 is determined via the system's active route through the configured resolver. The output also includes a CGNAT detection based on private IP ranges and the reserved 100.64.0.0/10 block, providing a helpful warning if detected. IPv6 privacy extensions are common, so local IPv6 detection has been removed to avoid redundant or unstable information.
9.3 KiB
9.3 KiB