kellyjonbrazil / jc

CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
MIT License
7.92k stars 210 forks source link

ifconfig parser of IPv4 do not support utun interfaces on macOS #581

Open shirok1 opened 4 months ago

shirok1 commented 4 months ago

Example (modified from my Tailscale interface):

utun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
        options=6460<TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
        inet 100.11.11.11 --> 100.11.11.11 netmask 0xffffffff
        inet6 fe80::ab:cd:ef:12%utun4 prefixlen 64 scopeid 0x18
        inet6 fd7a:ab:cd::ef:12 prefixlen 48
        nd6 options=201<PERFORMNUD,DAD>

This will affect any interface created by VPN applications.

kellyjonbrazil commented 4 months ago

Thank you for reporting this. Shouldn't be too difficult to fix in the next release.

kellyjonbrazil commented 2 months ago

I have a fix in the dev branch that will make it to the next release.

https://github.com/kellyjonbrazil/jc/commit/c26f0641ff2339fa03e2f6a3d70acaec95393205