the following patch to proxy 3.0.21 adds upstream proxy authentication of the type
forward / johndoe:boguspw@upstreamproxy:8000
Thanks a lot for the patch.
I think the following issues have to be addressed before it can be committed:
1. It lacks documentation (doc/source/p-config.sgml)
2. It sends the Basic authentication header unconditionally and doesn't deal with 407 responses which might occur if the proxy uses a different authentication scheme.
3. The password is hidden for a LOG_LEVEL_CONNECT message but will still be shown when viewing the config file through the CGI interface which by default is available for all Privoxy users while the log file should only be accessible for the Privoxy administrator.
4. A couple of style issues. strcpy and strpcat shouldn't be used in new code either.
5. The buffer sizes seem arbitrary (200, 256, 512) and if they aren't sufficient it looks like the token will be silently truncated due to lack of error checking.
Also note that Privoxy already sort of "supports" Basic authentication by adding a custom header with the pre-computed value.