A simple HTTP proxy server that can be run using Docker
4.7K
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 with xieyanbo/simple-proxy.
docker run command accordingly.This project is based on simple-proxy by jthomperoo.
Content type
Image
Digest
sha256:eca89942b…
Size
4.4 MB
Last updated
almost 2 years ago
docker pull xieyanbo/simple-proxy