Sam
Sam

Reputation: 11

Proxy server in C#

I am a newbie in network programming in C# and I want to create a proxy server which can be used to restrict users from connecting to internet if they have exceeded the download limit.

My current config is ---- User -> proxy server -> wifi router -> internet.

I searched everywhere and I found that HTTP proxy can be created but it is very hard to create a HTTPS proxy in C#

Even the c# library like Trotinet and mentalis does not support the HTTPS proxy.

But I found that there are many library in JAVA like little proxy that support HTTPS connection.

So, Is it possible to create a fully functional proxy in C#? or should I try switching to JAVA?

One More question. Can I create a simple TCP client read its networkstearm and forward that stream as it is to wifi router without need to read its header or anything, will this method work? Just a guess, sorry for noob question.

Thanks

Upvotes: 1

Views: 701

Answers (1)

Kumar S
Kumar S

Reputation: 133

Answer for your first question : YES, you can create full functional HTTPS proxy with C# (similar to Fiddler). No need for changing to Java. Just for testing purpose you can use Fiddler Core. Fiddler core is a complete HTTPS Proxy written in C#. If you have time and knowledge, do reverse engineering by using reflector on fiddler core and get some idea about implementation.

Last commit on Trotinet has a shy implementation of HTTPS pass thru. So unless you dont want to decrypt the https data, Trotinet will be a good choice.

-Kumar

Upvotes: 2

Related Questions