fujiapple852 / trippy

A network diagnostic tool
https://trippy.cli.rs
Apache License 2.0
3.48k stars 73 forks source link

add `--print-config-template` flag to output template config file #792

Closed Katzenbiber closed 9 months ago

Katzenbiber commented 9 months ago
Error: TOML parse error at line 42, column 1
   |
42 | unprivileged = false
   | ^^^^^^^^^^^^
unknown field `unprivileged`, expected one of `mode`, `log-format`, `log-filter`, `log-span-events`

Error: TOML parse error at line 185, column 1
    |
185 | dns-resolve-all = false
    | ^^^^^^^^^^^^^^^
unknown field `dns-resolve-all`, expected one of `dns-resolve-method`, `dns-lookup-as-info`, `dns-timeout`

Error: TOML parse error at line 256, column 1
    |
256 | tui-privacy-max-ttl = 0
    | ^^^^^^^^^^^^^^^^^^^
unknown field `tui-privacy-max-ttl`, expected one of `tui-max-samples`, `tui-preserve-screen`, `tui-refresh-rate`, `tui-address-mode`, `tui-as-mode`, `tui-geoip-mode`, `tui-max-addrs`, `geoip-mmdb-file`

Error: TOML parse error at line 305, column 1
    |
305 | toggle-help-alt = "?"
    | ^^^^^^^^^^^^^^^
unknown field `toggle-help-alt`, expected one of `toggle-help`, `toggle-settings`, `previous-hop`, `next-hop`, `previous-trace`, `next-trace`, `previous-hop-address`, `next-hop-address`, `address-mode-ip`, `address-mode-host`, `address-mode-both`, `toggle-freeze`, `toggle-chart`, `toggle-map`, `expand-hosts`, `contract-hosts`, `expand-hosts-max`, `contract-hosts-min`, `chart-zoom-in`, `chart-zoom-out`, `clear-trace-data`, `clear-dns-cache`, `clear-selection`, `toggle-as-info`, `toggle-hop-details`, `quit`

Apparently those settings are outdated.

Katzenbiber commented 9 months ago

Well, I'm kinda stupid as I used the config example from the master branch, while using v0.8.0.

For anyone having the same issue, just download the appropriate version from the right tag.

fujiapple852 commented 9 months ago

I think this is confusing, maybe an easy solution would be to update the link in the readme to point at the 0.8.0 version of the template config file?

alternatively Trippy could have a cmd line flag to generate a template config file?

fujiapple852 commented 9 months ago

@Katzenbiber FYI https://github.com/fujiapple852/trippy/pull/794

c-git commented 9 months ago

Making the docs point to the correct place is one solution but I wonder if that is likely to be forgotten to be updated when the next version comes out. I think the option to have a flag to generate was the better way to go.