justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 615 forks source link

Set authentication credentials for requests from Titanium #800

Open melanchall opened 4 years ago

melanchall commented 4 years ago

Hi,

Is it possible to set authentication credentials that will be used with each request? To understand what I mean, look please at Fiddler and its ability to specify X-AutoAuth parameter: https://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/AuthenticateWithCBT. From the mentioned article:

To use creds other than your Windows login credentials, set X-AutoAuth to "domain\username:password"

Is it possible to specify desired creds with Titanium?

honfika commented 4 years ago

You can do it manually in the BeforeResponse event if you know how to set this authentication headers for windows. (I don't know)

melanchall commented 4 years ago

I need to set custom credentials for NTLM/Negotiate authentication. From the docs I see:

EnableWinAuth Enable disable Windows Authentication (NTLM/Kerberos). Note: NTLM/Kerberos will always send local credentials of current user running the proxy process. This is because a man in middle attack with Windows domain authentication is not currently supported. Defaults to false.

So right now there is no way to set arbitrary credentials with Titanium?

honfika commented 4 years ago

It is not possbile with an easy property setting. You can do it only manually.

melanchall commented 4 years ago

Are there any plans to provide simple way of doing it like Fiddler provides?

honfika commented 4 years ago

No, sorry... but we are accepting pull request.. so if you implement it, it will be included:)