|
1 | | -# cloudscraper-proxy |
2 | | -A simple local proxy server, powered by [cloudscraper](https://github.com/VeNoMouS/cloudscraper) |
3 | | -<br></br> |
| 1 | +# π» cloudscraper-proxy |
4 | 2 |
|
5 | | -## Example |
6 | | -Before (standard request, contents blocked by cloudflare) |
| 3 | +A simple local proxy server, powered by [cloudscraper](https://github.com/VeNoMouS/cloudscraper) library βοΈ. |
| 4 | +> π‘ This allows you to easily bypass Cloudflare "restrictions" in your project, without having to add additional code |
| 5 | +
|
| 6 | +--- |
| 7 | + |
| 8 | +## π See it in Action! |
| 9 | + |
| 10 | +**Before** (Standard request, π§± contents blocked by Cloudflare): |
7 | 11 |  |
8 | 12 |
|
9 | | -After (using the local server, contents can be accessed normally) |
| 13 | +**After** (Using the local proxy β
, contents accessed normally): |
10 | 14 |  |
11 | 15 |
|
| 16 | +--- |
12 | 17 |
|
13 | | -## Usage |
14 | | -Replace the requests you'd like to make in your project |
15 | | -``` |
16 | | -https://www.google.com |
17 | | -``` |
18 | | -with a request to the bypass server |
19 | | -``` |
20 | | -localhost:port/api/proxy/https://www.google.com |
21 | | -``` |
22 | | -Then start the server so your project can make requests to it |
23 | | -``` |
24 | | -python server.py |
25 | | -``` |
26 | | -That's it! |
27 | | -<br></br> |
| 18 | +## π Getting Started |
28 | 19 |
|
29 | | -## Configuration |
30 | | -Changing the port can be done simply by editing the bottom of the file |
31 | | -``` |
| 20 | +1. **Modify Your Requests:** |
| 21 | + Instead of directly requesting a URL like: |
| 22 | + ``` |
| 23 | + https://www.google.com |
| 24 | + ``` |
| 25 | + Point it to your local proxy server: |
| 26 | + ``` |
| 27 | + http://localhost:5000/api/proxy/https://www.google.com |
| 28 | + ``` |
| 29 | + *(Replace `5000` if you change the default port)* |
| 30 | +
|
| 31 | +2. **Start the Proxy Server:** |
| 32 | + Run the Python server: |
| 33 | + ```bash |
| 34 | + python server.py |
| 35 | + ``` |
| 36 | +
|
| 37 | +That's it! π Your project can now make requests through the proxy. |
| 38 | +
|
| 39 | +--- |
| 40 | +
|
| 41 | +## βοΈ Configuration |
| 42 | +
|
| 43 | +Want to change the port? Easy! |
| 44 | +
|
| 45 | +Edit the `server.py` file at the bottom: |
| 46 | +```python |
32 | 47 | if __name__ == "__main__": |
33 | | - print('Starting cloudflare bypass proxy server') |
| 48 | + print('Starting Cloudflare bypass proxy server...') |
34 | 49 | from waitress import serve |
35 | | - serve(app, host="0.0.0.0", port=5000) # change the port here |
| 50 | + # π Change the port here |
| 51 | + serve(app, host="0.0.0.0", port=5000) |
36 | 52 | ``` |
37 | | -Feel free to configure flask or other options to suite your needs |
38 | | - |
39 | | -## Using Make Commands |
40 | | -The project includes several Make commands to help manage the Docker container: |
41 | 53 |
|
42 | | -```bash |
43 | | -# Build the Docker image |
| 54 | +## π³ Docker & Make Commands |
| 55 | +> π‘ The project includes several make commands to help manage the Docker container: |
| 56 | +``` |
| 57 | +# ποΈ Build the Docker image |
44 | 58 | make build |
45 | 59 |
|
46 | | -# Run the container |
47 | | -make run |
| 60 | +# βΆοΈ Run the Docker container (defaults to port 5000) |
| 61 | +make run |
48 | 62 |
|
49 | | -# Build and run in one command |
| 63 | +# π Build and run in one go |
50 | 64 | make up |
51 | 65 |
|
52 | | -# Stop and remove the container |
| 66 | +# π Stop and remove the container |
53 | 67 | make clean |
54 | 68 |
|
55 | | -# View container logs |
| 69 | +# π View container logs |
56 | 70 | make logs |
57 | 71 |
|
58 | | -# Restart the container |
| 72 | +# π Restart the container |
59 | 73 | make restart |
60 | 74 |
|
61 | | -# Check container status |
| 75 | +# π Check container status |
62 | 76 | make status |
63 | 77 | ``` |
64 | | - |
65 | | -You can change the port and container settings by editing the variables at the top of the Makefile. |
| 78 | +> π§ You can change the port and container settings by editing the variables at the top of the makefile. |
0 commit comments