versat / cntlm

Cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy intended to help you break free from the chains of Microsoft proprietary world. More info on http://cntlm.sourceforge.net/ website. This version also supports: SSPI (on Windows, NTLM authentication only), Kerberos authentication, IPv6, proxy PAC files.
GNU General Public License v2.0
127 stars 40 forks source link

Detailed logging and adding custom headers #72

Closed omerfsen closed 1 year ago

omerfsen commented 2 years ago

Hello is there a

  1. Having detailed logging such as suburl ?
  2. Can we add custom headers to outgoing requests such as no-cache etc.

if not can we behave this issue as a Feature Request?

jschwartzenberg commented 2 years ago
  1. Having detailed logging such as suburl ?

There's a log of logging with -v but it's not really fine-tunable. If you need advanced logging capabilities, I guess the easiest would be to look through the code and implement specifically what you need. Maybe you could enhance the -q flag?

  1. Can we add custom headers to outgoing requests such as no-cache etc.

There's the -r flag.

omerfsen commented 2 years ago

Can we define -r as a config stub ? Maybe something like

Header: "Pragma: no-cache" Header: "Cache-Control: no-cache"

omerfsen commented 2 years ago

Header Header substitution. See -r for details and remember, no quoting.

omerfsen commented 2 years ago

Header Pragma: no-cache Header Cache-Control: no-cache

will do

jschwartzenberg commented 2 years ago

Yes, this appears to be implemented, see: https://github.com/versat/cntlm/blob/master/main.c#L1198