Hello,

My question is mainly about networks.
I wan to implement a simple transparent proxy in C, which will filter the browsed sites according to URL blacklist (check before sending the HTTP request) and keywords in content (check the <meta> in the HTML that was responded).
How can I do this? Listen in a local socket (ex. 8080), set the proxy in my browser and according to the requests that the browser sends to me open a socket with the server, forward the browser's request to the server and forward the server's response to the browser? (Of course by applying filters in the stages where needed)

I would be glad if you could give me some example code to understand it and have something to start with.

Thank you!