varnish / hitch

A scalable TLS proxy by Varnish Software.
https://www.varnish-software.com/
Other
1.87k stars 157 forks source link

Optional on/off values for CLI flags #341

Closed ThijsFeryn closed 3 years ago

ThijsFeryn commented 4 years ago

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:

gquintard commented 4 years ago

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

daghf commented 3 years ago

I've added https://github.com/varnish/hitch/commit/b897a4b7241a6fe341ebdcf7e7c6a8132af3c177 which should take care of this.

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