Skip to content

Instantly share code, notes, and snippets.

@Zwork101
Created March 14, 2018 22:36
Show Gist options
  • Save Zwork101/c847554ea6c244c8faad97a619becf3a to your computer and use it in GitHub Desktop.
Save Zwork101/c847554ea6c244c8faad97a619becf3a to your computer and use it in GitHub Desktop.
the whole proxy file
from flask import Flask
from requests import get
app = Flask(__name__)
SITE_NAME = 'https://google.com/'
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
def proxy(path):
return get(f'{SITE_NAME}{path}').content
if __name__ == '__main__':
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