Skip to content

Instantly share code, notes, and snippets.

@Zwork101
Created March 15, 2018 01:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zwork101/9505dd41e04b3f9ddd89acffffe1337b to your computer and use it in GitHub Desktop.
Save Zwork101/9505dd41e04b3f9ddd89acffffe1337b to your computer and use it in GitHub Desktop.
Fixed proxy
from flask import Flask
from requests import get
app = Flask('__main__')
SITE_NAME = 'https://google.com/'
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def proxy(path):
return get(f'{SITE_NAME}{path}').content
app.run(host='0.0.0.0', port=8080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment