varnish/hitch

Optional on/off values for CLI flags

ThijsFeryn opened this issue · 2 comments

The current implementation of Hitch doesn't allow CLI flags like --write-proxy-v2 to accept on/off values.

It would be nice to set the following:

--write-proxy-v2=off

Although you could consider omitting this CLI flag from the command to disable this feature, this doesn't work if the feature was enabled in the hitch.conf file.

This shouldn't be a backwards compatibility break, because the original value --write-proxy-v2 will still work.

The desired outcome is to be able to set both on and off for any CLI option that doesn't yet accept values:

  • --tls
  • --ssl
  • --client
  • --quiet
  • --syslog
  • --daemon
  • --write-ip
  • --write-proxy-v1
  • --write-proxy-v2
  • --write-proxy
  • --write-proxy-proxy
  • --sni-nomatch-abort

agreed, I've been bit by that one, notably for the daemon option

daghf commented

I've added b897a4b which should take care of this.

For --tls/--ssl I'll deal with that separate as part of the fix for #340.