#!/usr/bin/env python3 from flask import Flask from flask import request, Response import webbrowser import time app = Flask(__name__) @app.route('/', methods = ['GET', 'POST']) def page(): if request.method == 'GET': return """\ Passthrough Browser Server

Passthrough Browser Server

This is the server for Passthrough Browser. Passthrough Browser is an Android app that, when set as the default browser in Waydroid, causes links to open in the host computer's browser.

If you have not yet installed the client app in Waydroid, follow these steps to install it:

""" elif request.method == 'POST': webbrowser.open(request.form['url']) return Response('', 203) if __name__ == '__main__': while True: try: app.run(host='192.168.250.1', port=8888) except OSError as e: print(e) time.sleep(3)