[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110802":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":39,"updatedAt":40,"readmeContent":41,"aiSummary":42,"trendingCount":15,"starSnapshotCount":15,"syncStatus":43,"lastSyncTime":44,"discoverSource":45},110802,"PocketHost","PrivyXe\u002FPocketHost","PrivyXe","Turn your Android phone into a real static web server. Go engine, Termux, Reverse Proxy,one-tap ZIP import, LAN + Cloudflare Tunnel, live metrics. No root..","https:\u002F\u002Fprivyxe.github.io\u002FPocketHost\u002F",null,"JavaScript",69,8,51,0,1,4,19,5,48.76,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37,38],"android","apk","cloudflare-tunnel","golang","gomobile","hosting","jetpack-compose","kotlin","localhost","self-hosted","static-site","termux","web-server","2026-11-06 15:24:33","2026-11-23 00:54:21","\u003Cdiv align=\"center\">\r\n\r\n\u003Cimg src=\"assets\u002Flogo.svg\" width=\"88\" alt=\"PocketHost logo\" \u002F>\r\n\r\n# PocketHost\r\n\r\n**A real web server in your pocket — static sites + Termux port proxies.**\r\n\r\nTurn an ordinary Android phone into a personal website host — no Linux, no root, no command\r\nline. Drop in a ZIP from any AI website builder, press **START HOSTING**, and the site is live on\r\nWi-Fi. Or reverse-proxy a Node\u002FPHP\u002FPython server already running in Termux (`127.0.0.1:\u003Cport>`)\r\nunder the same address — all methods, SSE and WebSocket included. Optionally expose it over HTTPS\r\nwith Cloudflare Tunnel.\r\n\r\n\u003Cp>\r\n  \u003Cimg alt=\"Android 8.0+\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid-8.0%2B-3DDC84?style=flat-square&logo=android&logoColor=white\" \u002F>\r\n  \u003Cimg alt=\"Kotlin\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FKotlin-2.0-7F52FF?style=flat-square&logo=kotlin&logoColor=white\" \u002F>\r\n  \u003Cimg alt=\"Jetpack Compose\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FJetpack-Compose-4285F4?style=flat-square&logo=jetpackcompose&logoColor=white\" \u002F>\r\n  \u003Cimg alt=\"Go\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGo-stdlib%20only-00ADD8?style=flat-square&logo=go&logoColor=white\" \u002F>\r\n\u003C\u002Fp>\r\n\u003Cp>\r\n  \u003Cimg alt=\"Version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-1.1.4-0f766e?style=flat-square\" \u002F>\r\n  \u003Cimg alt=\"APK size\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAPK-13.77%20MB-0f766e?style=flat-square\" \u002F>\r\n  \u003Cimg alt=\"Tests\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftests-207%20JVM%20%C2%B7%20103%20Go-2dd4bf?style=flat-square\" \u002F>\r\n  \u003Cimg alt=\"License: MIT\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-0f766e?style=flat-square\" \u002F>\r\n  \u003Cimg alt=\"Platform\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-arm64--v8a-2dd4bf?style=flat-square\" \u002F>\r\n\u003C\u002Fp>\r\n\r\n\u003Cp>\r\n  \u003Ca href=\"https:\u002F\u002Fx.com\u002FPrivyXe\">\u003Cimg alt=\"X\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F-@PrivyXe-000000?style=flat-square&logo=x&logoColor=white\" \u002F>\u003C\u002Fa>\r\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FPrivyXe\">\u003Cimg alt=\"GitHub\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F-PrivyXe-181717?style=flat-square&logo=github&logoColor=white\" \u002F>\u003C\u002Fa>\r\n  \u003Ca href=\"https:\u002F\u002Fwww.instagram.com\u002Fmr_cimen_\">\u003Cimg alt=\"Instagram\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F-@mr__cimen__-E4405F?style=flat-square&logo=instagram&logoColor=white\" \u002F>\u003C\u002Fa>\r\n\u003C\u002Fp>\r\n\r\n\u003Cimg src=\"assets\u002Fscreenshots\u002Fdashboard.png\" width=\"290\" alt=\"PocketHost dashboard while hosting\" \u002F>\r\n\r\n**🌐 Public hostname (served from the phone when hosting + tunnel are connected): [downmonitor.app](https:\u002F\u002Fdownmonitor.app\u002F)** · **Mirror: [privyxe.github.io\u002FPocketHost](https:\u002F\u002Fprivyxe.github.io\u002FPocketHost\u002F)** · **⬇️ Download: [latest release](..\u002F..\u002Freleases\u002Flatest)**\r\n\r\n\u003C\u002Fdiv>\r\n\r\n---\r\n\r\n## Download\r\n\r\nGet the signed APK from **[Releases](..\u002F..\u002Freleases\u002Flatest)**:\r\n\r\n| File | Details |\r\n|---|---|\r\n| `PocketHost-1.1.4-arm64.apk` | 13.77 MB · `arm64-v8a` only · Android 8.0+ · signed v2+v3 |\r\n| `PocketHost-1.1.4-arm64.apk.sha256` | SHA-256 checksum — verify before installing |\r\n| `PocketHost-1.1.4.json` | machine-readable build manifest (versionCode 11) |\r\n\r\n> **Sideload only.** PocketHost is not on Google Play. No account, no ads, no analytics.\r\n> Install: open the APK on an **ARM64** Android 8.0+ phone → allow \"install unknown apps\" → install.\r\n\r\n## Table of contents\r\n\r\n- [Why PocketHost?](#why-pockethost)\r\n- [How it compares](#how-it-compares)\r\n- [Status](#status)\r\n- [Screens](#screens)\r\n- [Features](#features)\r\n- [How it works](#how-it-works)\r\n- [Architecture](#architecture)\r\n- [Security model](#security-model)\r\n- [Requirements](#requirements)\r\n- [Install & first site](#install--first-site)\r\n- [Using the app](#using-the-app)\r\n- [Quality & verification](#quality--verification)\r\n- [Repository contents](#repository-contents)\r\n- [Known limitations](#known-limitations)\r\n- [FAQ](#faq)\r\n- [Troubleshooting](#troubleshooting)\r\n- [Roadmap](#roadmap)\r\n- [🇹🇷 Türkçe özet](#-türkçe-özet)\r\n- [License](#license)\r\n\r\n---\r\n\r\n## Why PocketHost?\r\n\r\nAI website builders made it trivial to *create* a site. Actually getting it online from a phone is\r\nstill painful: Termux, a VPS, a CI pipeline, or a monthly host. PocketHost exists to make that last\r\nstep one tap:\r\n\r\n- **Real hosting, not a mock** — a Go `net\u002Fhttp` server running inside the app process.\r\n- **No root, no Termux, no Linux** — a normal, unrooted Android phone is all you need.\r\n- **Private by default** — nothing leaves your LAN unless you explicitly connect a tunnel.\r\n- **Honest telemetry** — real metrics from the platform; anything unavailable is shown as\r\n  *unavailable*, never invented.\r\n- **One free, ad-free APK** — no account, no analytics, no paywall for local hosting.\r\n\r\n## How it compares\r\n\r\n| | PocketHost | Termux + nginx | VPS \u002F cloud | Static host (Netlify, etc.) |\r\n|---|---|---|---|---|\r\n| Hardware needed | your phone | your phone | rented server | none |\r\n| Root \u002F Linux \u002F terminal | ❌ | ✅ (terminal) | ✅ | ❌ |\r\n| Works on local Wi-Fi only | ✅ | ✅ | ❌ (needs routing) | ❌ |\r\n| HTTPS for the world | optional Cloudflare Tunnel | manual setup | manual DNS\u002FTLS | ✅ |\r\n| Cost | free | free | monthly | free tier \u002F monthly |\r\n| Setup time | one tap + ZIP | long | long | account + deploy config |\r\n| Data stays on device | ✅ | ✅ | ❌ | ❌ |\r\n| Real device metrics | ✅ | ❌ | ❌ | ❌ |\r\n\r\nPocketHost is deliberately **not** a production server and does not embed a dynamic runtime.\r\nIt hosts static sites and can reverse-proxy a Node\u002FPHP\u002FPython\u002FGo process you already run in Termux\r\n(no Node\u002FPHP binary in the APK, no MySQL, no Docker). It is a pocket-sized host for demos,\r\nprototypes, portfolios and local testing.\r\n\r\n## Status\r\n\r\n| | |\r\n|---|---|\r\n| **Release** | `1.1.4` (versionCode 11) — signed ARM64 APK, 13.77 MB, `arm64-v8a` only |\r\n| **Signed with** | project JKS, APK Signature Scheme **v2 + v3**, R8-minified |\r\n| **Verified on** | Android 16 \u002F API 36 emulator (x86_64): import → host → real HTTP round-trips, proxy E2E (all methods, SSE, WebSocket 101, 502, scan), Room 1→3 migration; **verified live** on a physical Android 16 phone via Named Tunnel → [downmonitor.app](https:\u002F\u002Fdownmonitor.app\u002F) |\r\n| **Engine** | Go stdlib `net\u002Fhttp` + `httputil.ReverseProxy`, embedded via `gomobile bind` (`libgojni.so`), 16 KB page-aligned; reverse proxy is loopback-only |\r\n| **Tests** | 207 JVM unit tests (23 suites) + 103 top-level Go tests \u002F 254 total + instrumented end-to-end runs (20 executed) |\r\n| **Tunnel** | bundled `cloudflared` 2026.10.7 (pinned source, patched DNS resolver); Quick Tunnel verified externally; **Named Tunnel + custom domain verified live** (4 parallel edge connections) → [downmonitor.app](https:\u002F\u002Fdownmonitor.app\u002F) |\r\n| **License** | [MIT](LICENSE) |\r\n\r\n> The phone is the origin: when hosting and the Named Tunnel are disconnected (or Android kills\r\n> the app process), Cloudflare answers `1033` for this hostname. Start hosting and connect the\r\n> tunnel to bring it back.\r\n## Screens\r\n\r\n\u003Ctable>\r\n  \u003Ctr>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Fdashboard.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Dashboard\u003C\u002Fb>\u003Cbr \u002F>server status, LAN URL, site summary\u003C\u002Fsub>\u003C\u002Ftd>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Fmetrics.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Metrics\u003C\u002Fb>\u003Cbr \u002F>requests, latency, response codes\u003C\u002Fsub>\u003C\u002Ftd>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Fsites.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Sites\u003C\u002Fb>\u003Cbr \u002F>static sites + Termux port proxies\u003C\u002Fsub>\u003C\u002Ftd>\r\n  \u003C\u002Ftr>\r\n  \u003Ctr>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Fproxy-add.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Add port proxy\u003C\u002Fb>\u003Cbr \u002F>detects live upstreams :3000\u002F:5173\u002F…\u003C\u002Fsub>\u003C\u002Ftd>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Fproxy-detail.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Proxy detail\u003C\u002Fb>\u003Cbr \u002F>upstream, proxied URL, per-proxy Host mode\u003C\u002Fsub>\u003C\u002Ftd>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Ftunnel.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Tunnel\u003C\u002Fb>\u003Cbr \u002F>Quick &amp; Named Cloudflare Tunnel\u003C\u002Fsub>\u003C\u002Ftd>\r\n  \u003C\u002Ftr>\r\n  \u003Ctr>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Fsettings.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Settings\u003C\u002Fb>\u003Cbr \u002F>port, bind mode, default proxy Host\u003C\u002Fsub>\u003C\u002Ftd>\r\n    \u003Ctd align=\"center\">\u003Cimg src=\"assets\u002Fscreenshots\u002Frelease.png\" width=\"230\" \u002F>\u003Cbr \u002F>\u003Csub>\u003Cb>Signed release\u003C\u002Fb>\u003Cbr \u002F>minified build running\u003C\u002Fsub>\u003C\u002Ftd>\r\n    \u003Ctd>\u003C\u002Ftd>\r\n  \u003C\u002Ftr>\r\n\u003C\u002Ftable>\r\n\r\n## Features\r\n\r\n### Hosting\r\n- Embedded Go HTTP server — starts in milliseconds, no child process, no shell.\r\n- Multiple sites: default site at `\u002F`, secondary sites at `\u002Fs\u002F\u003Cid>\u002F`.\r\n- SPA fallback, ETag \u002F Last-Modified \u002F `304`, gzip, per-site cache policy.\r\n- Directory index handling, custom 404\u002F405 responses, byte-range requests.\r\n- Foreground service (`specialUse`) + partial wake lock + Wi-Fi lock: keeps serving with the\r\n  screen off, stops cleanly on every path (nav-bar stop, notification action, app kill, reboot).\r\n- **Port proxies:** forward every method (GET\u002FPOST\u002FPUT\u002FPATCH\u002FDELETE\u002FOPTIONS), request bodies,\r\n  query strings, SSE\u002Flong-poll and **WebSocket** upgrades to a loopback upstream.\r\n\r\n### Port proxy (Termux)\r\n- Start a server in Termux (e.g. `node server.js` on `:3000`, `php -S 127.0.0.1:8000`,\r\n  `python -m http.server 9000`), then **Sites → ADD PORT PROXY**.\r\n- The app scans common dev ports, lists what is actually listening and offers one-tap selection.\r\n- The upstream is **always `127.0.0.1:\u003Cport>`** — no arbitrary host, no SSRF gadget. A proxy that\r\n  points at PocketHost's own listening port is rejected (`PROXY_LOOP`) before it can recurse.\r\n- Mounted under `\u002Fs\u002F\u003Cid>\u002F`: the prefix is stripped, `X-Forwarded-Prefix`\u002F`X-Forwarded-Host` are set,\r\n  absolute-path `Location` redirects are rewritten to the prefix, and absolute asset\u002FAPI calls are\r\n  routed back to the proxy via the page Referer.\r\n- **Per-proxy Host header:** each proxy chooses `Preserve client` (original Host + `X-Forwarded-Host`)\r\n  or `Upstream loopback` (`127.0.0.1:\u003Cport>` for Vite `allowedHosts`, Django `ALLOWED_HOSTS`, ...).\r\n- If the upstream is offline, visitors get a branded **502** page naming the port and the Termux\r\n  command to start it — never a fake success page. The app shows a live upstream-ONLINE check.\r\n- Development tier: **1 static website + 3 port proxies** (independent quotas). No Node\u002FPHP runtime is\r\n  embedded; nothing is executed inside the app.\r\n\r\n### Import\r\n- ZIP, a single HTML file, or a folder (SAF document tree via OpenDocumentTree).\r\n- Validates before touching storage: ZIP-Slip, symlinks, zip bombs, encrypted entries, duplicate\r\n  names, corrupted entries and **per-entry CRC32**.\r\n- Auto-detects the real website root (root `index.html`, single top-level folder, nested `public\u002F`).\r\n- Extracts atomically into app-private storage, shows a summary (root, file count, assets, storage)\r\n  before hosting. Re-import replaces a site safely.\r\n\r\n### Dashboard & metrics\r\n- Real RAM, storage, battery temperature, thermal status, network counters, uptime, total\r\n  requests, active connections, response-status distribution and latency.\r\n- Device-wide metrics and PocketHost-process metrics are shown **separately** with their source.\r\n- Latency percentiles are computed from a single sorted sample set, so `p50 ≤ p95 ≤ max` always.\r\n- CPU % is shown as *Unavailable* on devices where SELinux denies `\u002Fproc\u002Fstat` to apps — because\r\n  that is the truth, and PocketHost does not fabricate numbers.\r\n\r\n### Tunnel\r\n- Optional **Quick Tunnel** → temporary `https:\u002F\u002F*.trycloudflare.com` URL (no Cloudflare account).\r\n- Optional **Named Tunnel** → persistent hostname (verified live at `downmonitor.app`); tokens are encrypted at rest with Android\r\n  Keystore AES-256-GCM and never written to logs or passed on the command line (env-only).\r\n- Bundled `cloudflared` is built from pinned source with a small Android DNS patch\r\n  (`net.DefaultResolver` → `1.1.1.1` \u002F `8.8.8.8`), so no `--edge` hacks are needed.\r\n\r\n### Privacy & security\r\n- No accounts, no ads, no analytics, no telemetry, no crash reporting.\r\n- JNI-only control surface — the management API is not exposed over HTTP at all.\r\n- Every site's file access is confined to its root with Go's `os.Root`.\r\n- WebView preview locked to loopback, no JavaScript bridge.\r\n- Token redaction in logs; tokens never appear in the UI after saving.\r\n\r\n## How it works\r\n\r\n```\r\nZIP \u002F HTML \u002F folder\r\n        │\r\n        ▼\r\n  SAF import ──► validate ──► extract to app-private storage ──► site metadata\r\n                                                                    │\r\n                                                                    ▼\r\n                                                        START HOSTING (tap)\r\n                                                                    │\r\n                                       ┌────────────────────────────┴──────────────────────┐\r\n                                       ▼                                                   ▼\r\n                          http:\u002F\u002F\u003Cphone-ip>:8080                         Cloudflare Tunnel (optional)\r\n                          (same Wi-Fi, no internet)                     https:\u002F\u002F\u003Cname>.trycloudflare.com\r\n                                                                        or your named hostname\r\n```\r\n\r\nThe Kotlin layer never serves files itself: it starts the Go engine over a JSON command bus and the\r\nGo engine owns the HTTP server, routing, static file access and the loopback reverse proxy.\r\n\r\n## Architecture\r\n\r\n```mermaid\r\nflowchart LR\r\n  subgraph APP[\"Android app — Kotlin + Jetpack Compose (Material 3)\"]\r\n    UI[\"Dashboard · Sites · Tunnel · Settings\"] --> VM[\"ViewModels\"]\r\n    VM --> REPO[\"Repositories\"]\r\n    REPO --> DB[(\"Room \u002F SQLite\")]\r\n    REPO --> VAULT[\"Keystore AES-256-GCM vault\"]\r\n    REPO -->|\"JSON command bus\"| JNI[\"JNI bridge\"]\r\n    SVC[\"Foreground service (specialUse)\"] --> JNI\r\n  end\r\n  subgraph GO[\"Go engine — in-process .so\"]\r\n    JNI --> HTTP[\"net\u002Fhttp static server\"]\r\n    HTTP --> FS[(\"site files · os.Root\")]\r\n  end\r\n  subgraph TUN[\"cloudflared — bundled .so, child process\"]\r\n    CF[\"cloudflared run --protocol http2\"]\r\n  end\r\n  SVC --> CF\r\n  HTTP --> LAN[\"Wi-Fi visitors · http:\u002F\u002Fphone-ip:8080\"]\r\n  CF --> EDGE[\"Cloudflare edge · HTTPS\"]\r\n```\r\n\r\n**Key decisions**\r\n\r\n| Area | Choice | Why |\r\n|---|---|---|\r\n| Server | Go `net\u002Fhttp`, stdlib only | tiny, fast, no external deps; compiled to a `.so` with `gomobile bind` |\r\n| App ↔ engine | JSON command bus over JNI, off the main thread | no HTTP management surface to attack or expose |\r\n| UI | Kotlin, Compose, Material 3, single activity | modern Android baseline (minSdk 26) |\r\n| Storage | Room + app-private files | no broad storage permissions |\r\n| Secrets | Android Keystore AES-256-GCM | tunnel tokens never stored in plain text |\r\n| Proxy | `httputil.ReverseProxy` to `127.0.0.1:\u003Cport>` | all methods\u002FSSE\u002FWebSocket for free, loopback-only by construction |\r\n| Tunnel | pinned `cloudflared` built for Android | real Cloudflare connectivity, reproducible build |\r\n\r\n## Security model\r\n\r\n| Threat | Mitigation |\r\n|---|---|\r\n| Malicious ZIP (path traversal, symlink escape) | validated before extraction; `os.Root` confinement at serve time |\r\n| Zip bomb \u002F huge archive | entry count, size and compression-ratio limits; atomic extraction |\r\n| Corrupted archive | per-entry CRC32 verification, fail with a clear error |\r\n| Token theft from storage | Android Keystore AES-256-GCM; token passed via env, never argv |\r\n| Token leaking into logs | redaction + never echoed in UI; log ring keeps a bounded tail |\r\n| Remote control of the server | no management HTTP endpoint; JNI-only command bus |\r\n| WebView-based site preview escape | loopback-only URL, JS disabled bridge, no file access |\r\n| Unwanted internet exposure | LAN bind by default; public exposure requires explicit tunnel consent |\r\n| Port-proxy SSRF \u002F loop | upstream host is not user-editable (loopback only); `PROXY_LOOP` guard covers start and hot sync |\r\n\r\n## Requirements\r\n\r\n- Android **8.0+** (API 26), **ARM64** device, 4 GB RAM or more recommended.\r\n- Optional: a Cloudflare account + tunnel token for a persistent public hostname.\r\n- Optional: Termux with a Node\u002FPHP\u002FPython\u002FGo server bound to `127.0.0.1` for port-proxy hosting.\r\n- Local hosting needs no internet and no account.\r\n\r\n## Install & first site\r\n\r\n1. Download `PocketHost-1.0.5-arm64.apk` from **[Releases](..\u002F..\u002Freleases\u002Flatest)**; optionally\r\n   verify the published SHA-256.\r\n2. Open it on the phone → allow \"install unknown apps\" → install → launch.\r\n3. Allow notifications (required for background hosting).\r\n4. Export your website as a `.zip` with `index.html` at the root (or inside one folder).\r\n5. **IMPORT WEBSITE** → pick the ZIP → review the summary → confirm.\r\n6. **START HOSTING** → open `http:\u002F\u002F\u003Cphone-ip>:8080\u002F` from any device on the same Wi-Fi.\r\n\r\n### Optional: host a Termux backend (port proxy)\r\n\r\n1. Start your server in Termux bound to loopback, e.g. `node server.js` on `127.0.0.1:3000`.\r\n2. **Sites → ADD PORT PROXY** → the app detects `:3000` → **ADD & START HOSTING**.\r\n3. Open `http:\u002F\u002F\u003Cphone-ip>:8080\u002Fs\u002F\u003Cproxy-id>\u002F`. If your dev server validates the Host header\r\n   (Vite, Django, Rails), set **Upstream Host header → Upstream loopback** on the proxy detail screen.\r\n4. Stop the Termux server and reload: PocketHost answers a branded `502` page with the command to\r\n   start it again.\r\n\r\n### Optional: a custom domain with Cloudflare Tunnel\r\n\r\nA Quick Tunnel gives you a temporary `*.trycloudflare.com` URL and needs no account. For a\r\n**persistent domain of your own**, use a Cloudflare Named Tunnel:\r\n\r\n1. **Put the domain on Cloudflare first.**\r\n   - Cloudflare dashboard → **Add a site** → your domain → free plan.\r\n   - At your registrar, replace the nameservers with the two Cloudflare nameservers shown.\r\n   - Wait until the zone is **Active**. Tunnel hostnames will not resolve before that.\r\n\r\n2. **Create the tunnel and copy its token.**\r\n   - Cloudflare dashboard → **Networking → Tunnels** (Zero Trust) → **Create a tunnel**.\r\n   - Connector: **cloudflared** → name it, e.g. `pockethost-phone` → **Save tunnel**.\r\n   - On the install screen copy the token from `cloudflared service install eyJ...` — the long\r\n     `eyJ...` string is the token.\r\n\r\n3. **Connect PocketHost to the tunnel.**\r\n   - In the app: import a site and **START HOSTING** first.\r\n   - **Tunnel → Named Tunnel** → paste the token → **SAVE** → **CONNECT**.\r\n   - Wait for the state to become **CONNECTED**.\r\n\r\n4. **Route the domain to the phone.**\r\n   - Back in Cloudflare → **Networking → Tunnels** → click the tunnel's name.\r\n   - Open the **Routes** tab (in some dashboard versions: **Public Hostname**) → **Add route**:\r\n     - **subdomain:** leave empty for the apex domain (`yourdomain.com`) or enter `www`\r\n     - **domain:** your domain\r\n     - **service type:** **HTTP**\r\n     - **URL:** `http:\u002F\u002Flocalhost:8080` — must match **Settings → Port** in the app (8080 is the\r\n       default)\r\n   - Save. Cloudflare creates the DNS record automatically.\r\n\r\n5. Open `https:\u002F\u002Fyourdomain.com`. Cloudflare terminates TLS and the tunnel forwards plain HTTP to\r\n   your phone. If hosting is stopped or the phone is offline, the domain answers **502**.\r\n\r\n> Use `http:\u002F\u002F` for the origin URL, not `https:\u002F\u002F`: the Go server on the phone speaks plain HTTP,\r\n> and TLS is handled by Cloudflare's edge.\r\n\r\n## Using the app\r\n\r\n1. **Dashboard** — start\u002Fstop hosting, see the LAN URL, public URL and the default site summary.\r\n2. **Sites** — import, preview, enable\u002Fdisable, delete, inspect files, or **ADD PORT PROXY** for a\r\n   Termux upstream. Secondary sites\u002Fproxies are served at `\u002Fs\u002F\u003Csite-id>\u002F`.\r\n3. **Metrics** — requests, connections, status codes, latency percentiles, device\u002Fprocess memory,\r\n   battery temperature, storage and network counters. Reset at any time.\r\n4. **Tunnel** — connect a Quick Tunnel or paste a Named Tunnel token; watch the live log tail and\r\n   copy the public URL.\r\n5. **Settings** — port, bind mode, theme, diagnostics, developer links, known limitations.\r\n\r\nThe ongoing notification keeps hosting alive in the background and offers a **STOP** action.\r\n\r\n## Quality & verification\r\n\r\n- **207 JVM unit tests** across 23 suites (ZIP security, root detection, engine protocol, log\r\n  redaction, settings, tunnel parsing, metrics maths, plan quotas, proxy rules, per-proxy Host mode).\r\n- **103 top-level Go tests \u002F 254 test+subtest PASS lines** across 5 packages (routing,\r\n  default\u002Fsecondary sites, `304`\u002F`HEAD`\u002F`405`, traversal reject, ZIP validation + CRC, percentiles,\r\n  command bus, reverse proxy: methods\u002Fbody\u002FSSE\u002FWebSocket\u002F502\u002F`PROXY_LOOP`\u002F`ports.scan`, Location\r\n  rewrite, Referer fallback, upstream Host mode).\r\n- **Instrumented end-to-end run** on the API 36 emulator: real ZIP import → real Go engine → real\r\n  HTTP (`200`\u002F`304`\u002F`HEAD`\u002F`404`\u002F`405`\u002Ftraversal-reject\u002Fsecondary site) → clean stop; proxy E2E\r\n  (methods, SSE, WebSocket 101, 502, scan); Room 1→3 migration replay; STOP→START regression;\r\n  notification STOP while backgrounded. Latest run: **20 executed \u002F 0 failed \u002F 6 intentional skips**.\r\n- Quick Tunnel connected and verified **from an external host** (`curl` → HTTP 200 through\r\n  Cloudflare).\r\n\r\n## Repository contents\r\n\r\nThis public repository is a **release & marketing repo** — it intentionally does **not** contain the\r\napplication source code:\r\n\r\n```\r\nindex.html, css\u002F, js\u002F, assets\u002F    ← the trilingual marketing site (GitHub Pages)\r\nassets\u002Fscreenshots\u002F               ← real app screenshots used in this README\r\nREADME.md                         ← this document\r\nLICENSE                           ← MIT\r\nCHANGELOG.md                      ← version history\r\n```\r\n\r\nThe APK and its checksum are attached to **[Releases](..\u002F..\u002Freleases\u002Flatest)**, not committed to\r\nthe repository. The Android\u002FGo source tree is maintained privately.\r\n\r\n## Known limitations\r\n\r\n- The public hostname is only as available as the phone: when hosting is stopped and the tunnel is\r\n  disconnected, or the app process is killed, Cloudflare answers `1033` for it.\r\n- Automated tests run on the API 36 emulator; the ARM64 release also runs live on a physical Android 16 phone (user-operated) serving `https:\u002F\u002Fdownmonitor.app\u002F`, but this workspace did not run instrumented tests on that device.\r\n- `www.downmonitor.app` (and any additional hostname) is not configured yet; only the apex hostname\r\n  is published on the live Named Tunnel.\r\n- Longest continuous soak so far is a short measured session, not 24 h.\r\n- Absolute-path assets on **secondary** `\u002Fs\u002F\u003Cid>\u002F` sites are routed back via the page Referer;\r\n  requests without a Referer (some privacy settings\u002Ftools) still fall through to the default site.\r\n  The default site at `\u002F` is unaffected.\r\n- Folder import needs a provider that exposes child documents (DocumentsContract); some cloud or file-manager providers only work through a ZIP.\r\n- Port proxies reach only a loopback upstream on the same phone; the Termux process must stay\r\n  running (Android may freeze\u002Fkill it). No PHP\u002FNode runtime is embedded, and there is no MySQL\u002FDocker.\r\n- The per-proxy Host mode is stored with schema v3; existing proxies default to `Preserve client`.\r\n- Android 17 local-network permission is not yet handled (OS not released at build time).\r\n\r\n## FAQ\r\n\r\n\u003Cdetails>\r\n\u003Csummary>\u003Cb>Do I need root, Termux or a Linux install?\u003C\u002Fb>\u003C\u002Fsummary>\r\n\r\nNo. PocketHost targets an ordinary, non-rooted Android phone. There is no shell, no SSH and no\r\nserver configuration — the Go server is embedded in the app itself.\r\n\u003C\u002Fdetails>\r\n\r\n\u003Cdetails>\r\n\u003Csummary>\u003Cb>Is it free? Will it stay free?\u003C\u002Fb>\u003C\u002Fsummary>\r\n\r\nLocal hosting is free and ad-free in this release. Optional future add-ons (managed tunnel, custom\r\ndomain helpers) may be paid, but the core hosting feature is designed to stay free.\r\n\u003C\u002Fdetails>\r\n\r\n\u003Cdetails>\r\n\u003Csummary>\u003Cb>Will my site be exposed to the internet?\u003C\u002Fb>\u003C\u002Fsummary>\r\n\r\nBy default, only devices on the same Wi-Fi can reach it. Going public requires you to explicitly\r\nconnect Cloudflare Tunnel, and the app asks for confirmation before exposing anything.\r\n\u003C\u002Fdetails>\r\n\r\n\u003Cdetails>\r\n\u003Csummary>\u003Cb>Which sites are supported?\u003C\u002Fb>\u003C\u002Fsummary>\r\n\r\nStatic sites: HTML, CSS, JavaScript, images, fonts, `wasm` assets — plus **port proxies** to a\r\nNode\u002FPHP\u002FPython\u002FGo server you run in Termux on `127.0.0.1`. No PHP\u002FNode runtime is embedded in the\r\nAPK; MySQL and Docker are not supported.\r\n\u003C\u002Fdetails>\r\n\r\n\u003Cdetails>\r\n\u003Csummary>\u003Cb>Does it work on iPhone?\u003C\u002Fb>\u003C\u002Fsummary>\r\n\r\nNo. iOS platform rules do not allow a continuously running background server, so PocketHost is\r\nAndroid-only (8.0+ \u002F ARM64).\r\n\u003C\u002Fdetails>\r\n\r\n\u003Cdetails>\r\n\u003Csummary>\u003Cb>Can I use a custom domain?\u003C\u002Fb>\u003C\u002Fsummary>\r\n\r\nWith a Cloudflare Named Tunnel you can attach any domain you manage in Cloudflare. A built-in\r\ndomain setup wizard is on the roadmap.\r\n\u003C\u002Fdetails>\r\n\r\n\u003Cdetails>\r\n\u003Csummary>\u003Cb>Can I host a Node\u002FPHP\u002FPython app?\u003C\u002Fb>\u003C\u002Fsummary>\r\n\r\nYes — run it in Termux bound to `127.0.0.1:\u003Cport>` and add a **port proxy**. PocketHost forwards\r\nevery method, body, SSE and WebSocket upgrade; set the per-proxy Host mode if your dev server\r\nvalidates the Host header. The upstream must stay running; otherwise visitors see a branded `502`.\r\n\u003C\u002Fdetails>\r\n\r\n## Troubleshooting\r\n\r\n| Symptom | Check |\r\n|---|---|\r\n| `INSTALL_FAILED_NO_MATCHING_ABIS` | the release APK is `arm64-v8a` only — use an ARM64 phone |\r\n| Site loads locally but tunnel URL doesn't | confirm the tunnel state is `connected`, then open the log tail for Cloudflare errors |\r\n| `502 Bad Gateway` on your own domain | hosting must be running; tunnel `connected`; route URL must be `http:\u002F\u002Flocalhost:8080` matching **Settings → Port**; the Cloudflare zone must be **Active** |\r\n| Your domain does not resolve | its nameservers must point to Cloudflare and the zone must be **Active** (propagation can take a few hours); only then will tunnel hostnames work |\r\n| CPU gauge says *Unavailable* | expected on devices where SELinux denies `\u002Fproc\u002Fstat` to apps — not a bug |\r\n| Import rejected | the ZIP is validated strictly; check for symlinks, duplicate names or CRC errors |\r\n| Secondary site broken assets | use relative paths, or rely on the Referer fallback added in 1.0.1 |\r\n\r\n## Roadmap\r\n\r\n- [x] Physical ARM64 execution: live at [downmonitor.app](https:\u002F\u002Fdownmonitor.app\u002F) (user-operated Android 16 phone)\r\n- [x] Named Tunnel end-to-end verification with a real Cloudflare token (2026-11-05)\r\n- [x] Port proxy mode + upstream scan + branded 502 (1.1.0, 2026-11-06)\r\n- [x] Prefix-safe redirects, Referer fallback, per-proxy Host mode (1.1.2\u002F1.1.4, 2026-11-06)\r\n- [ ] 24-hour soak with power\u002Fthermal measurements on real hardware\r\n- [ ] Optional custom domain helper and richer tunnel diagnostics\r\n- [ ] Play Store build (`specialUse` justification + privacy policy) once device coverage is done\r\n\r\n## 🇹🇷 Türkçe özet\r\n\r\n**PocketHost**, sıradan bir Android telefonu gerçek bir web sunucusuna dönüştürür. AI aracından\r\nçıkan ZIP'i içe aktar, **BAŞLAT**'a bas; siten aynı Wi-Fi'deki herkes için açılır. İstersen Termux'ta\r\nçalışan Node\u002FPHP\u002FPython sunucunu **port proxy** ile aynı adresten yayınla (tüm metotlar, SSE,\r\nWebSocket) ve her proxy için Host modunu ayrı seç. Cloudflare Tunnel ile HTTPS üzerinden dünyaya aç.\r\n\r\n- Root \u002F Termux \u002F Linux **gerekmez**; reklam, hesap ve telemetri **yoktur**.\r\n- Motor, uygulama sürecinde çalışan **Go `net\u002Fhttp`** sunucusudur (JNI köprüsü, harici süreç yok).\r\n- Metrikler gerçektir; cihazın vermediği değer \"kullanılamıyor\" olarak gösterilir.\r\n- Port proxy'de upstream yalnızca `127.0.0.1:\u003Cport>` olabilir; Termux sunucusu açık kalmalıdır.\r\n- Kurulum: [Releases](..\u002F..\u002Freleases\u002Flatest) → `PocketHost-*-arm64.apk` → kur → ZIP'i içe aktar → BAŞLAT.\r\n- Site (TR\u002FEN\u002F中文): [privyxe.github.io\u002FPocketHost](https:\u002F\u002Fprivyxe.github.io\u002FPocketHost\u002F)\r\n- Lisans: **MIT**.\r\n\r\n## License\r\n\r\nThis project is licensed under the **MIT License** — see **[LICENSE](LICENSE)**.\r\n\r\n```\r\nMIT License · Copyright (c) 2026 PrivyXe\r\n```\r\n\r\nThird-party components keep their own licenses: AndroidX \u002F Jetpack Compose (Apache-2.0), Kotlin\r\n(Apache-2.0), Go standard library (BSD-3-Clause),\r\n[cloudflared](https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fcloudflared) (Apache-2.0).\r\n\r\nPocketHost is an independent project. It is **not affiliated with Google, Android, or Cloudflare**;\r\nCloudflare Tunnel is an optional third-party service and is subject to Cloudflare's terms.\r\n","PocketHost 是一款无需 Root 的 Android 应用，可将手机变为便携式静态网站服务器。它支持一键导入 ZIP 格式静态站点、反向代理 Termux 中运行的本地服务（如 Node\u002FPHP\u002FPython），并可选通过 Cloudflare Tunnel 实现公网 HTTPS 访问；内置实时监控指标与 Jetpack Compose 界面，基于 Go 标准库实现核心服务。适用于临时演示、个人博客部署、局域网内网穿透调试、教育实验及边缘轻量托管等场景。",2,"2026-11-24 04:39:37","CREATED_QUERY"]