开发者

HTTP/S proxy starting point [closed]

开发者 https://www.devze.com 2022-12-16 03:20 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 6 years ago.

开发者_C百科 Improve this question

I would like to make an HTTP/S proxy program to filter/deny certain http traffic based on how I parse the HTTP request in C++.

Is there some kind of starting point code that I can use with an open license for commercial use? For example if I wanted to do a project on searching I would start with lucene.


nginx is a high performance HTTP/S server written in C that can be used as a proxy.

It has a easy to use module system for which you can write plugins. You should consider using an existing parser like Ragel to help you on the filtering side.

It is licensed under a BSD-like license which is fine for commercial use.


Have a look at Squid (developers section).

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on most available operating systems, including Windows and is licensed under the GNU GPL.


You can't see the request at a proxy for HTTPS traffic - SSL is specifically designed to prevent this.

You could terminate the SSL connection at the proxy but would need to either rewrite all the URLs in the content to be non-SSL before passwing back to the client or install your skae oil CA Cert on all the clients and generate certificates on the fly.

If you just want to play around with HTTP, then SQUID alreay has hooks built-in to implement your own filtering mechanism.

C.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号