()
| 1529 | |
| 1530 | @app.route("/browser/update_tools") |
| 1531 | def browser_update_tools(): |
| 1532 | msgs = [] |
| 1533 | if is_termux() and which("pkg"): |
| 1534 | _run(["pkg", "update", "-y"]) |
| 1535 | _run(["pkg", "install", "-y", "openssl", "tor"]) |
| 1536 | msgs.append("Termux packages checked") |
| 1537 | if _run([sys.executable, "-m", "pip", "install", "--upgrade", "requests", "pysocks"]): |
| 1538 | msgs.append("Python packages updated") |
| 1539 | prefs = browser_prefs() |
| 1540 | count = len(fetch_proxy_pool(prefs.get("country", "US"), force_refresh=True)) |
| 1541 | msgs.append(f"{count} proxies ready") |
| 1542 | if prefs.get("tor_enabled"): |
| 1543 | ok, msg = start_tor() |
| 1544 | msgs.append(msg) |
| 1545 | flash(" · ".join(msgs) or "Browser tools checked.") |
| 1546 | return redirect(request.referrer or url_for("browser_settings")) |
| 1547 | |
| 1548 | |
| 1549 |
nothing calls this directly
no test coverage detected