Skip to content

Commit 287581e

Browse files
author
TinyProxy Dev
committed
docs: update README with modern architecture and docker instructions
1 parent 5ed6e6c commit 287581e

1 file changed

Lines changed: 53 additions & 30 deletions

File tree

README.md

Lines changed: 53 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,94 @@
11
# TinyProxy
22

3-
tinyproxy is a lightweight PHP proxy service with caching for fetching and serving web resources.
3+
TinyProxy is a fast, secure, and modern PHP proxy service with advanced caching, SSRF protection, rate limiting, and a sleek web UI.
44

5-
screenshots:
6-
![Screenshot 2023-09-03 00 00 25](https://github.com/bethropolis/tinyproxy/assets/66518866/7acd4764-25a7-407e-967e-d193d8165672)
7-
8-
![Screenshot 2023-09-03 00 06 26](https://github.com/bethropolis/tinyproxy/assets/66518866/1fef1996-e96e-41f1-95dd-7f7eae89ce1c)
5+
## Features
96

7+
- **High-performance caching:** File-based caching with automatic GZIP compression.
8+
- **Enterprise Security:** Built-in SSRF prevention, private IP blocking, and request rate limiting.
9+
- **Smart Modifications:** Automatic URL rewriting, ad blocking, and asset transformations on the fly.
10+
- **Admin Dashboard:** Built-in statistics, metrics, and cache management interface.
11+
- **Docker Ready:** Easy deployment using Docker and Docker Compose.
1012

1113
## Installation
1214

13-
1. Clone this repository to your web server:
15+
### Using Docker (Recommended)
1416

17+
1. Clone this repository:
1518
```sh
1619
git clone https://github.com/bethropolis/tinyproxy.git
17-
1820
cd tinyproxy
1921
```
2022

21-
2. Install the required dependencies using Composer:
23+
2. Start the service using Docker Compose:
24+
```sh
25+
docker-compose up -d --build
26+
```
27+
Your proxy will be available at `http://localhost:8080`.
28+
29+
### Manual Installation (PHP 8.3+)
2230

31+
1. Clone this repository:
32+
```sh
33+
git clone https://github.com/bethropolis/tinyproxy.git
34+
cd tinyproxy
2335
```
36+
37+
2. Install dependencies using Composer:
38+
```sh
2439
composer install
2540
```
26-
3. Run the TinyProxy service:
27-
```
28-
php -S localhost:8080
29-
```
30-
> I recommend using an `apache` server or `nginx` server.
3141

32-
using docker:
33-
```
34-
docker build -t tinyproxy .
35-
docker run -p 8080:80 --name tinyproxy-container tinyproxy
42+
3. Run the TinyProxy development server:
43+
```sh
44+
php -S localhost:8080 -t public
3645
```
3746

47+
> For production, it's recommended to point an Apache or Nginx virtual host directly to the `public/` directory.
48+
3849
## Usage
3950

40-
To use TinyProxy, simply make requests to the proxy URL with the `url` parameter:
51+
To use TinyProxy, simply visit the homepage or make requests to the proxy URL with the `url` parameter:
4152

4253
```
4354
http://localhost:8080/?url=https://www.example.com
4455
```
45-
curl:
56+
57+
Via cURL:
4658
```bash
47-
$ curl http://localhost:8080/?url=https://www.example.com
59+
$ curl "http://localhost:8080/?url=https://www.example.com"
4860
```
49-
> replace `localhost:8080` with your web server's address.
5061

51-
#### parameters
62+
### Admin Dashboard
5263

53-
| parameter | description | type |
54-
| --------- | ------------- |-------|
55-
| `url` | The URL to proxy. |string |
56-
| `cache` | The cache directory. |bool|
64+
You can monitor proxy performance, view statistics, and clear the cache by visiting the admin dashboard:
65+
```
66+
http://localhost:8080/admin
67+
```
68+
69+
### Configuration
5770

71+
TinyProxy uses a dot-notation configuration system. You can easily customize the application by creating a `.env` file in the project root:
5872

59-
> for more customization edit the `config.php` file.
73+
```env
74+
APP_ENV=production
75+
APP_DEBUG=false
6076
77+
# Cache settings
78+
CACHE_ENABLED=true
79+
CACHE_DEFAULT_TTL=3600
80+
81+
# Security
82+
SECURITY_BLOCK_PRIVATE_IPS=true
83+
SECURITY_RATE_LIMIT_ENABLED=true
84+
```
6185

6286
## Contributing
6387

64-
Contributions are welcome! If you find a bug or have an enhancement idea, please open an issue or submit a pull request.
88+
Contributions are welcome! If you find a bug or have an enhancement idea, please open an issue or submit a pull request. Ensure tests pass by running `vendor/bin/phpunit` before submitting.
6589

6690
## License
6791

6892
TinyProxy is released under the MIT License. See [LICENSE](LICENSE) for details.
6993

70-
71-
Happy proxying! 💜
94+
Happy proxying!

0 commit comments

Comments
 (0)