mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 21:11:14 +00:00
07448e662c
A proxy in front of TREK (Cloudflare, nginx, Caddy, Traefik, HAProxy) can let in only devices that show a client certificate. The apps could not, so such a server was unusable from them. - Address screen: the server check runs natively and notices when the server asks for a certificate. Instead of "no server answered" it says so and offers to add a .p12/.pfx file; a wrong password asks again, an expired, not yet valid or keyless file is named as such. - The certificate is shown only to the host and port it was added for. iOS keeps it in the keychain (this device only), Android seals the key with an Android Keystore key. The file's password is never stored. - The web view answers the server's certificate request on both platforms; WebSocket, service worker and API requests go through with it. The offline copy, watch requests and the check use it too. - When the server stops letting the app in (certificate removed, expired or no longer trusted) while the page still comes from the service worker or the offline copy, a native check sends the app to the address screen, which offers to add another. A server that only asks and lets everyone in is left alone. - Cloudflare-style 403 and nginx-style 400 refusals without a certificate lead to the same screen instead of staying up as an error page. - Settings, Account: a Client certificate card (only with one stored) shows subject, issuer, server and expiry, with Replace and Remove. - Wiki: Native-Apps "Client certificates (mTLS)" with Cloudflare, nginx, Caddy and Traefik setup and how to make a certificate for the app. - The app icon on the unreachable screen is black on the light surface.
32 lines
1.6 KiB
TypeScript
32 lines
1.6 KiB
TypeScript
/**
|
|
* Pages the apps link to outside the user's server. They open in the system
|
|
* browser: the WebView hands every navigation off the server's own origin to it.
|
|
*/
|
|
|
|
/** The privacy policy the store listings name too. */
|
|
export const PRIVACY_URL = 'https://liketrek.com/privacy?app=1';
|
|
|
|
/** What a TREK server is and how to run one, for someone who has none yet. */
|
|
export const SERVER_DOCS_URL = 'https://github.com/liketrek/TREK#readme';
|
|
|
|
/** Running the app with a sign-in proxy (Cloudflare Access, Pangolin and the like) in front of TREK. */
|
|
export const AUTH_PROXY_DOCS_URL = 'https://github.com/liketrek/TREK/wiki/Native-Apps#behind-a-sign-in-proxy';
|
|
|
|
/** Adding a client certificate for a server behind mutual TLS (Cloudflare, nginx, Caddy, Traefik). */
|
|
export const CLIENT_CERT_DOCS_URL = 'https://github.com/liketrek/TREK/wiki/Native-Apps#client-certificates-mtls';
|
|
|
|
/** The public demo the address screen offers to someone without a server. */
|
|
export const DEMO_SERVER_URL = 'https://demo.liketrek.com';
|
|
|
|
/** TREK Cloud, for someone who wants a hosted TREK rather than running their own. */
|
|
export const CLOUD_URL = 'https://liketrek.com';
|
|
|
|
/**
|
|
* The terms an in-app subscription is sold under: Apple's standard licence
|
|
* agreement, which the App Store applies when an app names no own EULA. The
|
|
* store rules ask for it next to the purchase, together with the privacy policy.
|
|
*/
|
|
export const STORE_TERMS_URL = 'https://www.apple.com/legal/internet-services/itunes/dev/stdeula/';
|
|
/** Our terms for TREK Cloud (§ 5a covers a purchase in the app), as the app opens them: without the site's sales header. */
|
|
export const CLOUD_TERMS_URL = 'https://liketrek.com/terms?app=1';
|