Quick Start Guide¶
Get up and running with Relyr in just a few minutes! This guide will walk you through the basics of setting up and using Relyr as your proxy solution.
Prerequisites¶
Before you begin, ensure you have:
- Relyr installed (see Installation Guide)
- Basic understanding of HTTP proxies
- Terminal/command line access
5-Minute Setup¶
Step 1: Initialize Configuration¶
# Create configuration directory
mkdir -p ~/.config/relyr
# Generate default configuration
relyr config init
This creates a basic configuration file at ~/.config/relyr/relyr.yml:
Step 2: Start Relyr¶
You should see output similar to:
Step 3: Test Your Proxy¶
Open a new terminal and test the proxy:
# Test with curl
curl -x http://localhost:8080 http://httpbin.org/ip
# Expected output:
# {
# "origin": "YOUR_PROXY_IP"
# }
Congratulations! 🎉 You now have a working Relyr proxy server.
Basic Usage Examples¶
HTTP Requests Through Proxy¶
Configure your browser to use localhost:8080 as HTTP proxy:
Chrome/Chromium:
Firefox:
1. Go to Settings → Network Settings
2. Select "Manual proxy configuration"
3. HTTP Proxy: localhost, Port: 8080
4. Check "Use this proxy server for all protocols"
Common Configuration¶
Custom Port¶
Enable Authentication¶
auth:
enabled: true
method: basic
users:
- username: admin
password: secretpassword
- username: user
password: userpass
Test with authentication:
Logging Configuration¶
Upstream Proxy¶
Chain proxies by configuring an upstream proxy:
upstream:
enabled: true
proxy: http://upstream.example.com:8080
auth:
username: upstream_user
password: upstream_pass
Environment Variables¶
You can also configure Relyr using environment variables:
# Server configuration
export RELYR_SERVER_HOST=0.0.0.0
export RELYR_SERVER_PORT=8080
# Logging
export RELYR_LOG_LEVEL=info
# Authentication
export RELYR_AUTH_ENABLED=true
export RELYR_AUTH_USERNAME=admin
export RELYR_AUTH_PASSWORD=secret
# Start server with environment config
relyr server
Health Checks¶
Monitor your Relyr instance:
# Check server health
curl http://localhost:8080/health
# Get server statistics
curl http://localhost:8080/stats
# Get configuration info
relyr config show
Docker Quick Start¶
For containerized deployment:
# Run Relyr in Docker
docker run -d \
--name relyr \
-p 8080:8080 \
relyr/relyr:latest
# Test the containerized proxy
curl -x http://localhost:8080 https://httpbin.org/ip
Performance Testing¶
Test your proxy performance:
# Simple performance test
time curl -x http://localhost:8080 https://httpbin.org/get
# Load testing with Apache Bench
ab -n 1000 -c 10 -X localhost:8080 https://httpbin.org/get
# Using wrk for more advanced testing
wrk -t4 -c100 -d30s --script proxy.lua https://httpbin.org/get
Next Steps¶
Now that you have Relyr running, explore these advanced features:
🔧 Configuration¶
- HTTP Proxy Setup - Advanced proxy configurations
- Environment Variables - Complete environment variable reference
- Advanced Configuration - Performance tuning and advanced features
📚 API Integration¶
- API Overview - REST API documentation
- Authentication - API authentication methods
- Endpoints - Complete API reference
💡 Examples¶
- Basic Usage - More usage examples
- Advanced Examples - Complex configurations
- Integration Patterns - Integration with other tools
🛠️ Troubleshooting¶
- Common Issues - Solutions to common problems
- FAQ - Frequently asked questions
- Performance Tips - Optimization guide
Getting Help¶
If you run into issues:
- Check the logs:
tail -f ~/.config/relyr/logs/relyr.log - Validate your configuration:
relyr config validate - Review our troubleshooting guide
- Join our community forum
- Report bugs on GitHub
Configuration File Reference¶
Here's a complete basic configuration file for reference:
# ~/.config/relyr/relyr.yml
# Server configuration
server:
host: 0.0.0.0
port: 8080
read_timeout: 30s
write_timeout: 30s
# Logging configuration
logging:
level: info
format: text
output: stdout
# Proxy configuration
proxy:
enabled: true
protocols:
- http
- https
# Authentication (optional)
auth:
enabled: false
method: basic
users: []
# Monitoring (optional)
monitoring:
enabled: true
metrics_port: 9090
health_check_port: 8081
# Performance tuning
performance:
max_connections: 1000
connection_timeout: 10s
keep_alive_timeout: 60s
That's it! You're now ready to use Relyr as your proxy solution. 🚀