Open jealvin opened 1 year ago
I know this can be added in the core itself. But in the meantime, one option is to achieve this using your own custom AuthPlugin
plugin. Simply, copy over existing AuthPlugin
and modify it as per your needs. The enable your auth plugin using the --auth-plugin
flag. Default plugin raises ProxyAuthenticationFailed
exception which internally returns a hardcoded PROXY_AUTH_FAILED_RESPONSE_PKT
response back to client. You simply want to have your own custom response packet for failure scenarios.
I'll dig back into it and see how to generically add it within core flow.
request for adding custom header when doing auth
Proxy-Authenticate:
Basic realm="Proxy.py Server"
so it will show the message "Proxy.py Server" when request username and password
reference : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authenticate