how do I use a proxy with wxhttp?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 236
Joined: Thu Jan 29, 2009 3:33 pm

how do I use a proxy with wxhttp?

Post by ninja9578 » Thu Jan 29, 2009 4:20 pm

I know about SetProxyMode... but how to I set the proxy? There is no function for that. I thought that make it used a global proxy and I could set it with wxURL::SetDefaultProxy(_T(""));, but that doesn't work.

I really want my program to be seen by Fiddler for debugging purposes, and I need to set the proxy to the one above to do so.

Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

Post by spectrum » Fri Jan 30, 2009 7:11 pm

hi ninja,

this is a really intetresting post.

First of all, is interesting that the documentation don't talk about the SetProxyMode method of wxHTTP.

It is undocumented on the official documentation, probabvly becouse it do nothing.
Looking wxHTTP 2.8.9, and 2.9.0, it only set the "m_proxy_mode" protected boolean, but this variable is no more used in any other place, and i don't see any accessor to retrieve it.

Then on the net you find a nice wiki page that talk about:

void SetProxyMode(bool on)
Set whether or not to use a proxy.

Hehe, but don't show in any place how to use it becouse it do nothing actually.

wxURL::SetDefaultProxy and wxURL::SetProxy are instead well implemented, they should allow a kind of tunneling through the proxy channel.

Try something like

wxURL url("");
etc etc


Post Reply