Proxy API for handling requests.
This project provides a simple proxy API for requests. It's built with Go and includes Docker support for easy deployment.
- Proxy requests.
- Built with Go.
- Docker support.
- Go 1.22+
- Docker (optional)
-
Docker:
docker run -d -p 9900:80 --pull always --name proxy-api ghcr.io/thecaliskan/proxy-api
-
Binary: Download release, extract and run command on cli
./proxy-api
Configuration options can be set via environment variables:
- PROXY_API_PORT: The port on which the server will run (default: 9900, docker: 80).
curl --location 'localhost:9900' \
--header 'X-Proxy-Url: https://httpbin.org/get'
curl --location 'localhost:9900' --request POST \
--header 'X-Proxy-Url: https://httpbin.org/post' \
--header 'Content-Type: application/json' \
--data '{
"john": "doe",
"foo": "bar"
}'
curl --location 'localhost:9900' --request POST \
--header 'X-Proxy-Url: https://httpbin.org/post' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'john=doe' \
--data-urlencode 'foo=bar'
curl --location 'localhost:9900' --request PUT \
--header 'X-Proxy-Url: https://httpbin.org/put' \
--header 'Content-Type: application/json' \
--data '{
"john": "doe",
"foo": "bar"
}'
-
Clone the repository:
git clone https://github.com/thecaliskan/proxy-api.git cd proxy-api
-
Build the application:
go build -o proxy-api
Contributions are welcome! Please submit a pull request or open an issue for any bugs or feature requests.
This project is licensed under the MIT License. See the LICENSE file for details.