|
1 | | -# 👻 cloudscraper-proxy |
| 1 | +<div align="center"> |
| 2 | + <h1>cloudscraper-proxy</h1> |
| 3 | + <p>A simple local proxy server, powered by <a href="https://github.com/VeNoMouS/cloudscraper">cloudscraper</a> library</p> |
| 4 | +</div> |
2 | 5 |
|
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 |
| 6 | +<p align="center"> |
| 7 | + <img src="https://img.shields.io/badge/python-3.8+-blue?style=for-the-badge&logo=python&logoColor=white"> |
| 8 | + <img src="https://img.shields.io/github/v/release/GhostTypes/cloudscraper-server?style=for-the-badge"> |
| 9 | + <img src="https://img.shields.io/badge/docker-ready-blue?style=for-the-badge&logo=docker&logoColor=white"> |
| 10 | +</p> |
5 | 11 |
|
6 | | ---- |
7 | | - |
8 | | -## 👀 See it in Action! |
9 | | - |
10 | | -**Before** (Standard request, 🧱 contents blocked by Cloudflare): |
11 | | - |
12 | | - |
13 | | -**After** (Using the local proxy ✅, contents accessed normally): |
14 | | - |
| 12 | +<div align="center"> |
| 13 | + <p>This allows you to easily bypass Cloudflare "restrictions" in your project, without having to add additional code</p> |
| 14 | +</div> |
15 | 15 |
|
16 | 16 | --- |
17 | 17 |
|
18 | | -## 🚀 Getting Started |
19 | | - |
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. |
| 18 | +<div align="center"> |
| 19 | + <h2>Getting Started</h2> |
| 20 | +</div> |
| 21 | + |
| 22 | +<div align="center"> |
| 23 | +<table> |
| 24 | + <tr> |
| 25 | + <th>Step</th> |
| 26 | + <th>Instructions</th> |
| 27 | + </tr> |
| 28 | + <tr> |
| 29 | + <td><strong>1. Modify Your Requests</strong></td> |
| 30 | + <td> |
| 31 | + Instead of directly requesting a URL like:<br> |
| 32 | + <code>https://www.google.com</code><br><br> |
| 33 | + Point it to your local proxy server:<br> |
| 34 | + <code>http://localhost:5000/api/proxy/https://www.google.com</code><br> |
| 35 | + <em>(Replace <code>5000</code> if you change the default port)</em> |
| 36 | + </td> |
| 37 | + </tr> |
| 38 | + <tr> |
| 39 | + <td><strong>2. Start the Proxy Server</strong></td> |
| 40 | + <td> |
| 41 | + Run the Python server:<br> |
| 42 | + <code>python server.py</code> |
| 43 | + </td> |
| 44 | + </tr> |
| 45 | +</table> |
| 46 | +</div> |
| 47 | + |
| 48 | +<div align="center"> |
| 49 | + <p>That's it! Your project can now make requests through the proxy.</p> |
| 50 | +</div> |
38 | 51 |
|
39 | 52 | --- |
40 | 53 |
|
41 | | -## ⚙️ Configuration |
| 54 | +<div align="center"> |
| 55 | + <h2>Configuration</h2> |
| 56 | +</div> |
| 57 | + |
| 58 | +<div align="center"> |
| 59 | + <p>Want to change the port? Easy!</p> |
| 60 | +</div> |
42 | 61 |
|
43 | | -Want to change the port? Easy! |
| 62 | +<div align="center"> |
| 63 | + <p>Edit the <code>server.py</code> file at the bottom:</p> |
| 64 | +</div> |
44 | 65 |
|
45 | | -Edit the `server.py` file at the bottom: |
46 | 66 | ```python |
47 | 67 | if __name__ == "__main__": |
48 | 68 | print('Starting Cloudflare bypass proxy server...') |
49 | 69 | from waitress import serve |
50 | | - # 👇 Change the port here |
| 70 | + # Change the port here |
51 | 71 | serve(app, host="0.0.0.0", port=5000) |
52 | 72 | ``` |
53 | 73 |
|
54 | | -## 🐳 Docker & Make Commands |
55 | | -> 💡 The project includes several make commands to help manage the Docker container: |
56 | | -``` |
57 | | -# 🏗️ Build the Docker image |
58 | | -make build |
59 | | -
|
60 | | -# ▶️ Run the Docker container (defaults to port 5000) |
61 | | -make run |
62 | | -
|
63 | | -# 🚀 Build and run in one go |
64 | | -make up |
65 | | -
|
66 | | -# 🛑 Stop and remove the container |
67 | | -make clean |
68 | | -
|
69 | | -# 📜 View container logs |
70 | | -make logs |
71 | | -
|
72 | | -# 🔄 Restart the container |
73 | | -make restart |
| 74 | +--- |
74 | 75 |
|
75 | | -# 📊 Check container status |
76 | | -make status |
77 | | -``` |
78 | | -> 🔧 You can change the port and container settings by editing the variables at the top of the makefile. |
| 76 | +<div align="center"> |
| 77 | + <h2>Docker & Make Commands</h2> |
| 78 | +</div> |
| 79 | + |
| 80 | +<div align="center"> |
| 81 | + <p>The project includes several make commands to help manage the Docker container</p> |
| 82 | +</div> |
| 83 | + |
| 84 | +<div align="center"> |
| 85 | +<table> |
| 86 | + <tr> |
| 87 | + <th>Command</th> |
| 88 | + <th>Description</th> |
| 89 | + </tr> |
| 90 | + <tr> |
| 91 | + <td><code>make build</code></td> |
| 92 | + <td>Build the Docker image</td> |
| 93 | + </tr> |
| 94 | + <tr> |
| 95 | + <td><code>make run</code></td> |
| 96 | + <td>Run the Docker container (defaults to port 5000)</td> |
| 97 | + </tr> |
| 98 | + <tr> |
| 99 | + <td><code>make up</code></td> |
| 100 | + <td>Build and run in one go</td> |
| 101 | + </tr> |
| 102 | + <tr> |
| 103 | + <td><code>make clean</code></td> |
| 104 | + <td>Stop and remove the container</td> |
| 105 | + </tr> |
| 106 | + <tr> |
| 107 | + <td><code>make logs</code></td> |
| 108 | + <td>View container logs</td> |
| 109 | + </tr> |
| 110 | + <tr> |
| 111 | + <td><code>make restart</code></td> |
| 112 | + <td>Restart the container</td> |
| 113 | + </tr> |
| 114 | + <tr> |
| 115 | + <td><code>make status</code></td> |
| 116 | + <td>Check container status</td> |
| 117 | + </tr> |
| 118 | +</table> |
| 119 | +</div> |
| 120 | + |
| 121 | +<div align="center"> |
| 122 | + <p>You can change the port and container settings by editing the variables at the top of the makefile.</p> |
| 123 | +</div> |
0 commit comments