0

I want to know how I can detect if the network the computer is connected to has proxy, and if it does then I want to be able to get the proxy address and the port of the network and use it in the web browser.

I know this cannot be done through the webkit's properties, and some DLLs need to be imported. So, this is what I have so far:

[DllImport("webkit-1.0")]
static extern IntPtr webkit_get_default_session();

[DllImport("soup-2.4")]
static extern IntPtr soup_uri_new(string uri);

[DllImport("gobject-2.0")]
static extern void g_object_set(IntPtr obj, string name, IntPtr value, IntPtr zero);

As you can see, I have imported the DLLs needed, but I don't know what to do next.

I really need help with this. If someone can give me a link or give me some codes that can fulfill the requirements that I have stated in the beginning then please give it to me.

Thanks a lot.

rqmok
  • 834
  • 2
  • 9
  • 20

1 Answers1

0

WebKit is not something you use to connect to the internet, AFAIK its a rendering engine.
Underlying it would be using Sockets to connect to the internet.
For .NET search msdn for HttpWebRequest to learn how the request object makes use of proxies for making the request.

Also if the computer your software is configured to run via proxy in Internet Options, any requests your application makes will also be via the proxy.

Vignesh.N
  • 2,618
  • 2
  • 25
  • 33