This is a simple proxy server that forwards requests to a target server. It is implemented using the net
module of Node.
- Clone the repository
- Navigate to the
01-proxy
directory - Run
yarn install
ornpm install
- Run
node server.ts
- Open a browser and go to setting > network > proxy settings and set the proxy to
localhost:8000
- Open a new tab and go to
the target server
(e.g.http://www.google.com
) and you should see the request being logged in the terminal where the proxy server is running.