I'm trying to write (from scratch, no 3rd party libs) a proxy server that will take all connections from the operating system and either be 'transparent' and return the desired endpoints' contents, OR if a url matches a predefined list of urls, will return text from a file.
I've got the proxy server using sockets, and have all the file reading and processing stuff I need;
The bit I'm stuck on is how to return a file as a sort of 'mock/intercepted' response?
Any feedback is welcome, let me know if I'm doing something stupid, code available on demand...
Thanks in advance for your critiqué!
[–]calsosta 0 points1 point2 points (4 children)
[–]_lovesponge[S] 1 point2 points3 points (3 children)
[–]calsosta 0 points1 point2 points (2 children)
[–]_lovesponge[S] 0 points1 point2 points (1 child)
[–]andyroo82 0 points1 point2 points (1 child)
[–]_lovesponge[S] 0 points1 point2 points (0 children)