Hi Heiko, Well, I can try ... :-). Some thoughts here - hope this helps, but of course feel free to ask questions! 1) I have attached some code I put together to detect proxy information automatically (using WinHTTP, and in particular WinHttpGetProxyForUrl). It works with PAC files (at least it did for me ... :-)). I have also included some links in the code, to get more info on the Windows API's. Please excuse the poor coding though - I'm a HW guy, not a SW expert (not even close!). The slew of messages that I have put in the code are just FYI for now. These could be split to console output, or logging, or just removed. Whatever you prefer. BTW, I'm not sure how you use proxy in your code. At least with the PAC file that I go through, I get a response back of the format proxy.domain.net:8080;10.10.10.10:8080. We may need to parse this (again, just not sure how you use it). Also, I have not implemented asynchronous processing. It can be done, but not sure it buys much, as you really can't proceed until the proxy information is available. I also haven't modified the WinHTTP timeout. Again, this can be done if needed (but the response is typically quite quick). I agree with your targets - and one further comment ... auto-proxy detection should be done every time a connection attempt is to be started (i.e. even when reconnecting), agreed? 2) I can't say too much about automatic logon, but I have seen some example code on Microsoft's web site related to using fAutoLogonIfChallenged (more details starting from http://msdn.microsoft.com/en-us/library/aa383153(v=vs.85).aspx). They seem to show this automatically logging on the the proxy server (for HTTP requests), so it may be worth a try. Thoughts? Hope this helps you out! Take care,... Russell
On Mon, 08/08/2011 09:08 AM, Heiko Hund <heiko.h...@sophos.com> wrote: > Hi, > > On Monday 08 August 2011 01:15:02 Russell Morris wrote: > > Has anyone had any luck with the auto-proxy function, in particular with > > PAC files? It really doesn't seem to be working for me ... :-(. > > Are you aware of https://community.openvpn.net/openvpn/ticket/24 ? This is > probably what's causing your trouble... and of course the fact that the > current impelmentation does not do proxy auto detection. > > I'll start resolving these issues now as it is something the GUI is relying > onto as well. Openvpn should even be able to handle per Dial-up and VPN > connection proxy settings if things work out. > > > Also, does anyone have a proxy server that requires authentication? I > > currently use a text file (which does work!), but there are also Windows > > functions that should send domain login information automatically. It > > would be nice to to that ... :-). > > I like that idea, but t's probably unrelated to auto-proxy. Could you point > me > to the APIs. > > Heiko > -- > Heiko Hund | Software Engineer | Phone +49-721-25516-237 | Fax -200 > Astaro a Sophos Company | Amalienbadstr. 41 Bau 52 | 76227 Karlsruhe | Germany > Commercial Register: Mannheim HRA 702710 | Headquarter Location: Karlsruhe > > Represented by the General Partner Astaro Verwaltungs GmbH > Amalienbadstraße 41 Bau 52 | 76227 Karlsruhe | Germany > Commercial Register: Mannheim HRB 708248 | Executive Board: Gert Hansen, > Markus Hennig, Jan Hichert, Günter Junk, Dr. Frank Nellissen > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel >
AutoProxy.c
Description: Binary data