A simple HTTP proxy server that can be run using Docker. This project is based on the simple-proxy open source project.
You can either use the pre-compiled image or build your own. Here are instructions for both methods:
To quickly run the proxy server using a pre-compiled image, use the following command:
docker run -d -p 8888:8888 xieyanbo/simple-proxy
This will start the proxy server in the background, mapping port 8888 from the container to port 8888 on your host machine.
If you prefer to build your own image, follow these steps:
-
Build the Docker image:
docker build -t simple-proxy .
-
Run the Docker container:
docker run -p 8888:8888 simple-proxy
This command will start the proxy server and map port 8888 from the container to port 8888 on your host machine.
-
(Optional) To run the container in the background, use the
-d
flag:docker run -d -p 8888:8888 simple-proxy
Regardless of which method you used to start the proxy:
-
Configure your client to use the proxy:
Set your HTTP proxy settings to
http://localhost:8888
in your browser or application. -
To verify the proxy using command line:
You can use either of these commands to test if the proxy is working correctly:
curl --proxy 'http://localhost:8888' https://example.com
or
https_proxy=http://localhost:8888 curl https://example.com
If the proxy is working, you should see the HTML content of example.com.
-
To stop the container:
docker stop $(docker ps -q --filter ancestor=simple-proxy)
If you used the pre-compiled image, replace
simple-proxy
withxieyanbo/simple-proxy
.
- The proxy server runs on port 8888 by default. If you need to use a different port, modify the Dockerfile and adjust the
docker run
command accordingly. - Make sure you have Docker installed and running on your system before executing these commands.
- This is a basic HTTP proxy and may not support all features of a full-fledged proxy server.
This project is based on simple-proxy by jthomperoo.