views:

450

answers:

2

What are the steps to implement that feature in 1) Windows and 2) in Mac? I went through these, still I am not very clear! I am using C/C++ in Windows and in Mac. So, Win API or Mac API will be enough.

I am also confused because Mac Firefox has also has a option "Use system proxy settings", which is not present in Windows Firefox.

These are some similar questions:

LINK-1: http://stackoverflow.com/questions/1068212/programitcally-detect-system-proxy-settings-on-windows-xp-with-python

LINK-2: http://stackoverflow.com/questions/191023/how-does-windows-actually-detect-lan-proxy-settings-when-using-automatic-config

According the this Wiki WPAD article, we should traverse in this sequence:

But LINK-1 says "GET http://wpad/wpad.dat" is enough. Which one should I follow?

+1  A: 

On Mac you use SCDynamicStoreCopyProxies(NULL) and query the resulting dictionary for the information you need. See QA1234 for an example.

On Windows the linked questions should get you where you need. You might want to add where you got stuck.

Georg Fritzsche
Updated with more details.
Sabya
A: 

I using librproxy. That solved this requirement.

Sabya