Getting Started with Faroxy
Table of contents
Installation
Prerequisites
Before installing Faroxy, ensure you have:
- Java 17 or higher
- Gradle 7.x or higher
- Docker (optional)
Quick Install
- Clone the repository:
git clone https://github.com/vinipx/faroxy.git cd faroxy
- Run with Gradle:
./gradlew bootRun
Docker Installation
- Build the image:
docker build -t faroxy .
- Run the container:
docker run -p 8080:8080 faroxy
Basic Usage
Accessing the Web Interface
- Open your browser and navigate to
http://localhost:8080
- You’ll see the Faroxy dashboard with:
- Real-time traffic monitor
- Request/response details
- Search and filter options
Using as a Proxy
Simple GET Request
curl "http://localhost:8080/proxy?url=https://api.example.com/data"
POST Request with JSON
curl -X POST "http://localhost:8080/proxy?url=https://api.example.com/data" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Form Data Submission
curl -X POST "http://localhost:8080/proxy?url=https://api.example.com/data" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key1=value1&key2=value2"
Configuration
Local Configuration
- Create your local config:
cp src/main/resources/application-local.properties.template config/application-local.properties
- Edit the configuration:
server.port=9090 faroxy.proxy.port=9999 logging.level.io.faroxy=DEBUG
Environment Variables
Override settings using environment variables:
export SERVER_PORT=9090
export SPRING_DATASOURCE_URL=jdbc:h2:mem:customdb
Next Steps
- Learn about Advanced Features
- Explore the API Reference
- Check out Configuration Options