To run the JavaScript implementation of the HTTP proxy, use the following command:
node source-code/proxy.jsTo use the JavaScript implementation of the HTTP proxy, follow these steps:
- Start the proxy server by running the command above.
- Configure your web browser or application to use the proxy server. Set the proxy server address to
localhostand the port to6969. - Access websites through the proxy server. The proxy server will handle HTTP and HTTPS requests, cache responses, and block access to specified sites.
- To access a website using the pattern
/example.com, use the URLlocalhost:6969/example.com. - To manage the proxy server, use the following commands in the terminal where the proxy server is running:
blocked: List currently blocked sites.cached: List currently cached sites.close: Close the proxy server.<site_url>: Block the specified site URL.