A simple Flask web application that acts as a proxy server, allowing you to retrieve and display content from other websites.
- Proxies both GET and POST requests.
- Adds a base URL to content for static assets.
-
Clone this repository:
git clone https://github.com/yourusername/flask-proxy-server.git cd flask-proxy-server
-
Run the Flask application:
python app.py
The application will be accessible at http://127.0.0.1:5000.
-
Open your browser and navigate to http://127.0.0.1:5000/proxy?url=http://example.com to test the proxy functionality.
-
Send a GET request to
/proxy
with theurl
parameter to retrieve content from the specified URL. Example: http://127.0.0.1:5000/proxy?url=http://example.com -
Send a POST request to
/proxy
with theurl
parameter in the form data to retrieve content from the specified URL. Example usingcurl
:curl -X POST -d "url=http://example.com" http://127.0.0.1:5000/proxy
- The application is set to run in debug mode. Update the
debug
parameter inapp.run()
for production deployment.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize the README further based on additional features, instructions, or configuration details you might want to provide. Additionally, make sure to include a license file (such as the MIT License) in your project if you haven't already.