45 lines
1.4 KiB
Raw Permalink Normal View History

2022-07-04 13:33:12 -07:00
#!/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 """\
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Passthrough Browser Server</title>
<h1>Passthrough Browser Server</h1>
<p>This is the server for <a href=>Passthrough Browser</a>. 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.</p>
<p>If you have not yet installed the client app in Waydroid, follow these steps to install it:</p>
<li>Open Waydroid</li>
<li>Open a terminal</li>
<li><code>cd</code> to the directory where you downloaded Passthrough Browser</li>
<li>Follow the instructions on the command line</li>
elif request.method == 'POST':['url'])
return Response('', 203)
if __name__ == '__main__':
while True:
try:'', port=8888)
except OSError as e: