English | Português
A robust and configurable HTTP proxy server developed in TypeScript, featuring authentication, host access control, and logging. Ideal for scenarios such as Discord bots, data scraping, and traffic control.
- 🔐 Basic authentication via
.env
- 🌐 Host access control
- 📄 Logging with Winston
- ⚙️ Configuration via environment variables
- 🧪 Modular and extensible structure
-
Clone the repository:
git clone https://github.com/HCDevWorks/http-proxy.git cd http-proxy
-
Install the dependencies:
pnpm install
-
Configure the
.env
file:PORT=8888 ENABLE_LOGS=true ENABLE_ERROR_LOGS=false PROXY_USERNAME=your_username PROXY_PASSWORD=your_password ALLOWED_HOSTS='google.com','youtube.com'
Start the proxy server with:
pnpm build # build the server
and
pnpm start # start the server
The server will listen on the port defined in PORT
(default: 8888).
See how to create a systemd service to run the proxy automatically on Linux in docs/linux-service.md
.
http-proxy/
├── src/
│ ├── config/
│ │ └── config.ts # Loads environment variables
│ ├── logger/
│ │ └── logger.ts # Winston logger configuration
│ └── server/
│ └── server.ts # Main proxy server logic
├── tests/ # Proxy and benchmark tests
│ ├── testProxy.ts
│ └── testProxyBenchmark.ts
├── .env # Environment variables
├── package.json
├── pnpm-lock.yaml
├── tsconfig.json
└── docs/
└── pt-br/
└── README.md # Documentation in Brazilian Portuguese
Contributions are welcome! Please read our Code of Conduct and Contributing Guidelines before opening issues or pull requests.
We also provide templates to help you:
This project is licensed under the MIT License.