goprox is a lightweight HTTP proxy server written in Go that automatically converts HTTP requests to HTTPS requests. It's designed to help bypass defective SSL/TLS implementations by acting as a local proxy that handles the HTTPS conversion transparently.
Many applications and systems have defective or problematic SSL/TLS implementations that can cause connectivity issues when making HTTPS requests directly. goprox solves this by:
- Acting as a local HTTP proxy that you can configure your applications to use
- Automatically converting all incoming HTTP requests to HTTPS requests
- Handling SSL/TLS negotiation on behalf of your applications
- Providing a simple workaround for SSL/TLS implementation problems
- π HTTP to HTTPS Conversion: Automatically converts HTTP requests to HTTPS
- π Lightweight: Single binary with no external dependencies
- π Request Logging: Logs all incoming requests for debugging
- π§ Header Management: Properly forwards and manages HTTP headers
- β‘ High Performance: Built with Go's efficient HTTP handling
- Go 1.24.6 or later
- Clone the repository:
git clone https://github.com/albal/goprox.git
cd goprox- Initialize the Go module and build:
go mod init goprox
go mod tidy
go build -o goprox .- (Optional) Build with race detection for development:
go build -race -o goprox-race .Run the proxy server:
./goproxOr run directly with Go:
go run .The server will start and listen on port 8888 by default. You should see:
Starting HTTP proxy server on :8888
Configure your applications to use the proxy:
- Proxy Host:
localhostor127.0.0.1 - Proxy Port:
8888 - Protocol: HTTP proxy
# Use goprox to make HTTPS requests via HTTP proxy
curl -x http://localhost:8888 http://example.comexport HTTP_PROXY=http://localhost:8888
export HTTPS_PROXY=http://localhost:8888
# Your applications will now use the proxyMany applications support proxy configuration through settings or command-line options. Configure them to use http://localhost:8888 as the HTTP proxy.
- goprox listens for HTTP requests on port 8888
- For each incoming request:
- Extracts the target host and path
- Converts the request to use HTTPS scheme
- Forwards the request to the destination server using HTTPS
- Returns the response back to the client
- All SSL/TLS negotiation is handled by goprox, not your application
Your App β HTTP Request β goprox :8888 β HTTPS Request β Target Server
Your App β HTTP Response β goprox β HTTPS Response β Target Server
Format code:
go fmt ./...Vet code:
go vet ./...Install and run linter (optional):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
$HOME/go/bin/golangci-lint run.
βββ main.go # Single source file containing the complete proxy implementation
βββ go.mod # Go module definition
βββ LICENSE # MIT License
βββ README.md # This file
βββ .gitignore # Git ignore rules
The proxy is implemented as a single Go file (main.go) using only the Go standard library:
net/http- HTTP server and client functionalityio- Request/response body copyinglog- Request logging
Currently, goprox uses sensible defaults:
- Port: 8888 (hardcoded)
- Protocol: Converts all requests to HTTPS
- Logging: Enabled by default
Future versions may include configuration options for port, logging levels, and protocol handling.
If you see "bind: address already in use", another process is using port 8888:
# Kill existing goprox processes
pkill goprox
# Or find what's using the port
lsof -i :8888- Ensure your application is configured to use HTTP proxy (not HTTPS proxy)
- Verify the proxy address is
http://localhost:8888 - Check the proxy logs for error messages
We welcome contributions! Here's how you can help:
- π Bug fixes - Help us improve reliability
- β¨ New features - Add configuration options, protocol support, etc.
- π Documentation - Improve README, add examples
- π§ͺ Tests - Add test coverage
- π§ Performance - Optimize proxy performance
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Test your changes:
go build -o goprox . && ./goprox - Format and vet:
go fmt ./... && go vet ./... - Commit your changes:
git commit -am 'Add your feature' - Push to the branch:
git push origin feature/your-feature - Create a Pull Request
- Configuration file support
- Command-line flags for port and settings
- HTTPS proxy support (in addition to HTTP proxy)
- Request/response filtering and modification
- Performance metrics and monitoring
- Docker container support
- Authentication support
This project is licensed under the MIT License - see the LICENSE file for details.
Al West - Initial work
- Built with Go's excellent standard library
- Inspired by the need to work around problematic SSL/TLS implementations
- Thanks to the Go community for excellent documentation and examples