Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Android app: pair with a plain http:// server on the home network (#428, #329)

Duarte Santos8fc25d29bec8
diff --git a/docs/MOBILE.md b/docs/MOBILE.md
index 89209d69f..4b398fb7a 100644
--- a/docs/MOBILE.md
+++ b/docs/MOBILE.md
@@ -40,9 +40,13 @@ or Settings → Account → **"Connect to my server"** later) to finish. Notes:
- Works offline too: the phone keeps its copy (and the file mirror) while connected, and
changes made without a network go to the server as soon as it is reachable again.
-- Use an `https://` address. The app's WebView is an https page, so the phone blocks a plain
- `http://` server before anything is sent, and pairing says so. It also keeps the bearer token
- (the connection carries one instead of a cookie) off the network in plain text.
+- `https://` is best: it keeps the pairing code and the bearer token (the connection carries one
+ instead of a cookie) off the network in plain text. A plain `http://` server on your home
+ network works too since v1.3.11 (Android; #428): type the address with `http://` in front, for
+ example `http://192.168.1.20:8080`. An address without a scheme is tried as `https://`, and when
+ that gets nowhere on a home address, pairing tells you to add `http://`. The app also reminds
+ you that http is not encrypted, so keep it to your own network. Your browser still needs a
+ password to sign in there and make the code: passkeys only work over https (or `localhost`).
- Pairing says your server "refused the app's request (CORS)", or that "a login page or proxy
rule replied instead of openGym", or fails with "Failed to fetch" on an older version, while
the browser works? Something in front of openGym is answering the app instead: a reverse proxy
diff --git a/docs/SELF_HOSTING.md b/docs/SELF_HOSTING.md
index 243917cee..c49085d0f 100644
--- a/docs/SELF_HOSTING.md
+++ b/docs/SELF_HOSTING.md
@@ -188,8 +188,10 @@ https://localhost` line. A `200` with no CORS headers, a `30x` or `401`, an HTML
The app tells these cases apart since v1.3.10: when the server is reachable but the request is
refused, pairing says so instead of "Failed to fetch", and when a login page or proxy rule
-answered in openGym's place, it says that too. The app also only pairs with an `https://` address:
-its WebView is an https page, so the phone blocks a plain `http://` server before anything is sent.
+answered in openGym's place, it says that too. Since v1.3.11 the Android app also pairs with a
+plain `http://` address on your LAN (type the `http://`; #428). Sign in on the web with a password
+to make the code, since passkeys need https. Over http the code and the app's token cross your
+network unencrypted, so keep it to a network you trust.
## 4. Multiple users
diff --git a/frontend/android/app/src/main/res/xml/network_security_config.xml b/frontend/android/app/src/main/res/xml/network_security_config.xml
index fb6083789..0a8ce3fc7 100644
--- a/frontend/android/app/src/main/res/xml/network_security_config.xml
+++ b/frontend/android/app/src/main/res/xml/network_security_config.xml
@@ -3,10 +3,16 @@
Since API 24 an app trusts system CAs only, so the WebView refused the handshake while
Chrome on the same phone, which honours user-installed CAs, opened the server fine.
Trust both. A user CA is something the owner of the phone installed on purpose, behind a
- system warning; this is the same trust the browser already gives it. Cleartext is left at
- the platform default (off). -->
+ system warning; this is the same trust the browser already gives it.
+
+ Issues #428, #329: cleartext is allowed. The only servers this app talks to are the ones
+ its user typed in (their own openGym, their own Coach endpoint), and plenty of them run on
+ a home network over plain http, which the phone's browser opens fine. Android cannot scope
+ this to "private addresses", so it is app wide; the app's own downloads (exercise media)
+ use https addresses anyway. capacitor.config.json lets the WebView, an https page, make
+ those http requests (allowMixedContent), and pairing warns that http is not encrypted. -->
<network-security-config>
- <base-config>
+ <base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
diff --git a/frontend/capacitor.config.json b/frontend/capacitor.config.json
index 3242150b0..b635dfa5f 100644
--- a/frontend/capacitor.config.json
+++ b/frontend/capacitor.config.json
@@ -4,6 +4,6 @@
"webDir": "dist",
"backgroundColor": "#0c0e12",
"android": {
- "allowMixedContent": false
+ "allowMixedContent": true
}
}
diff --git a/frontend/src/lib/api.js b/frontend/src/lib/api.js
index ac44849e7..a59133957 100644
--- a/frontend/src/lib/api.js
+++ b/frontend/src/lib/api.js
@@ -272,20 +272,31 @@ async function whyUnreachable(base, ms) {
const origin = globalThis.location?.origin || 'https://localhost'
return failure(t('Your server was reached, but it refused the app’s request (CORS). If a reverse proxy such as Traefik adds CORS headers, let requests from {0} through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.', origin), 'cors')
}
+ // An address typed without a scheme is tried as https://. A home server on plain http gives
+ // that try nothing to talk to, while the phone's browser, which tries http, opens it (#428).
+ let u = null
+ try { u = new URL(base) } catch { /* said as it is below */ }
+ if (u && u.protocol === 'https:' && looksLocal(u.hostname)) {
+ return failure(t('Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.', hostOfBase(base)), 'unreachable')
+ }
return failure(t('Could not reach {0}. Check the address and that this phone can reach it.', hostOfBase(base)), 'unreachable')
}
-// The app's WebView is an https:// page with mixed content off, so a plain http:// server is
-// refused before a single byte goes out, and the probes above would only say "could not reach".
-// localhost counts as secure and is let through.
-async function blockedAsMixedContent(base) {
- let u
- try { u = new URL(base) } catch { return false }
- if (u.protocol !== 'http:' || /^(localhost|127\.\d+\.\d+\.\d+|\[::1\])$/i.test(u.hostname)) return false
- try {
- const cap = await import('@capacitor/core')
- return !!(cap && cap.Capacitor && cap.Capacitor.isNativePlatform())
- } catch { return false }
+// An address that only makes sense on a home network: a private or link-local IP, a name
+// without a dot ("nas"), or a LAN-only suffix (.local, .lan, .home.arpa, .internal). Those are
+// where a server most often runs on plain http, so an https:// try that got nowhere is worth a
+// hint about http:// (#428). A public name gets the plain "could not reach" instead.
+export function looksLocal(hostname) {
+ const h = String(hostname || '').toLowerCase().replace(/^\[|\]$/g, '').replace(/\.$/, '')
+ if (!h) return false
+ const v4 = /^(\d{1,3})\.(\d{1,3})\.\d{1,3}\.\d{1,3}$/.exec(h)
+ if (v4) {
+ const a = +v4[1], b = +v4[2]
+ return a === 10 || a === 127 || (a === 172 && b >= 16 && b <= 31) || (a === 192 && b === 168) ||
+ (a === 169 && b === 254) || (a === 100 && b >= 64 && b <= 127)
+ }
+ if (h.includes(':')) return h === '::1' || /^f[cd]/.test(h) || /^fe[89ab]/.test(h)
+ return !h.includes('.') || /\.(local|lan|home|home\.arpa|internal|localdomain)$/.test(h)
}
// Bootstraps the connection itself: the base isn't configured yet (that's what this call decides),
@@ -302,9 +313,6 @@ export async function pairRedeem(serverBase, code, { probeMs = PROBE_MS } = {})
if (e && e.status === 400) throw failure(t('That code didn’t work. Codes last 5 minutes and work once, so grab a fresh one.'), 'pair-invalid', 400)
// The server answered (any status) or did not answer in time: that error says it already.
if (e && (e.status != null || e.code)) throw e
- if (await blockedAsMixedContent(serverBase)) {
- throw failure(t('The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.'), 'insecure')
- }
throw await whyUnreachable(serverBase, probeMs)
}
// Anything that is not a pairing would be saved as one — and the phone would then send every
diff --git a/frontend/src/lib/api.pair-http.test.js b/frontend/src/lib/api.pair-http.test.js
new file mode 100644
index 000000000..d3763526a
--- /dev/null
+++ b/frontend/src/lib/api.pair-http.test.js
@@ -0,0 +1,71 @@
+// @vitest-environment happy-dom
+// #428, #329: the phone app pairs with a plain http:// server too (the Android WebView allows the
+// mixed content and the cleartext now), so an http:// address that fails is probed like any
+// other instead of being blamed on http. And a home server typed without a scheme is tried as
+// https://, which a plain-http server never answers: that failure says to type http:// instead.
+import { afterEach, describe, expect, it, vi } from 'vitest'
+
+const h = vi.hoisted(() => ({ native: true }))
+vi.mock('@capacitor/core', () => ({
+ Capacitor: { getPlatform: () => (h.native ? 'android' : 'web'), isNativePlatform: () => h.native },
+ CapacitorHttp: { request: () => Promise.reject(new Error('unreachable')) },
+ registerPlugin: () => ({}),
+}))
+
+const { pairRedeem, looksLocal } = await import('./api.js')
+
+afterEach(() => { vi.unstubAllGlobals(); h.native = true })
+const failed = () => Promise.reject(new TypeError('Failed to fetch'))
+const json = (body, status) => new Response(JSON.stringify(body), { status, headers: { 'content-type': 'application/json' } })
+
+describe('pairRedeem from the phone app with an http:// address', () => {
+ it('pairs: the request goes out to the http:// address as typed', async () => {
+ const fetch = vi.fn(async () => json({ token: 'T', user: { id: 'u1', name: 'andi' } }, 200))
+ vi.stubGlobal('fetch', fetch)
+ const r = await pairRedeem('http://192.168.1.20:8080', 'ABCD2345')
+ expect(r.token).toBe('T')
+ expect(fetch.mock.calls[0][0]).toBe('http://192.168.1.20:8080/api/pair/redeem')
+ })
+
+ it('a failure is probed like any other address, never blamed on http', async () => {
+ const fetch = vi.fn(failed)
+ vi.stubGlobal('fetch', fetch)
+ const e = await pairRedeem('http://192.168.1.20:8080', 'ABCD2345', { probeMs: 20 }).catch(x => x)
+ expect(e.code).toBe('unreachable')
+ expect(e.message).toBe('Could not reach 192.168.1.20:8080. Check the address and that this phone can reach it.')
+ expect(fetch.mock.calls[1][0]).toBe('http://192.168.1.20:8080/api/health')
+ })
+
+ it('a server that answers over http:// is passed on as it is', async () => {
+ vi.stubGlobal('fetch', vi.fn(async () => json({ error: 'invalid or expired code' }, 400)))
+ await expect(pairRedeem('http://192.168.1.20:8080', 'ABCD2345')).rejects.toMatchObject({ status: 400 })
+ })
+})
+
+describe('an https:// try at a home address that gets nowhere', () => {
+ it.each(['https://192.168.1.20:8080', 'https://nas:8080', 'https://gym.local', 'https://10.0.0.5'])('%s: suggests http://', async base => {
+ vi.stubGlobal('fetch', vi.fn(failed))
+ const e = await pairRedeem(base, 'ABCD2345', { probeMs: 20 }).catch(x => x)
+ const host = base.slice('https://'.length)
+ expect(e.code).toBe('unreachable')
+ expect(e.message).toBe(`Could not reach ${host} over https://. If your server runs on plain http (common at home), type http://${host} instead.`)
+ })
+
+ it('a public name keeps the plain message', async () => {
+ vi.stubGlobal('fetch', vi.fn(failed))
+ const e = await pairRedeem('https://gym.example.com', 'ABCD2345', { probeMs: 20 }).catch(x => x)
+ expect(e.message).toBe('Could not reach gym.example.com. Check the address and that this phone can reach it.')
+ })
+})
+
+describe('looksLocal', () => {
+ it('private, link-local, loopback and CGNAT (Tailscale) addresses', () => {
+ for (const a of ['10.1.2.3', '172.16.0.1', '172.31.255.1', '192.168.0.10', '169.254.1.1', '127.0.0.1', '100.64.0.1', '100.101.102.103', '[fd00::1]', 'fe80::1', '::1']) expect(looksLocal(a), a).toBe(true)
+ })
+ it('home-network names', () => {
+ for (const a of ['nas', 'gym.local', 'server.lan', 'box.home.arpa', 'gym.internal', 'GYM.LOCAL.']) expect(looksLocal(a), a).toBe(true)
+ })
+ it('public addresses and names', () => {
+ for (const a of ['8.8.8.8', '172.32.0.1', '100.128.0.1', 'gym.example.com', 'localhost.example.org', '2001:db8::1', '']) expect(looksLocal(a), a).toBe(false)
+ })
+})
diff --git a/frontend/src/lib/api.pair-insecure.test.js b/frontend/src/lib/api.pair-insecure.test.js
deleted file mode 100644
index 16bdf9a46..000000000
--- a/frontend/src/lib/api.pair-insecure.test.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// @vitest-environment happy-dom
-// #329: the app's WebView is an https:// page with mixed content off, so pairing with a plain
-// http:// address is refused before anything is sent. "Could not reach" sent people looking for
-// a network problem; the message says it is the http:// instead.
-import { afterEach, describe, expect, it, vi } from 'vitest'
-
-const h = vi.hoisted(() => ({ native: true }))
-vi.mock('@capacitor/core', () => ({
- Capacitor: { getPlatform: () => (h.native ? 'android' : 'web'), isNativePlatform: () => h.native },
- CapacitorHttp: { request: () => Promise.reject(new Error('mixed content')) },
- registerPlugin: () => ({}),
-}))
-
-const { pairRedeem } = await import('./api.js')
-
-afterEach(() => { vi.unstubAllGlobals(); h.native = true })
-const failed = () => Promise.reject(new TypeError('Failed to fetch'))
-const MSG = 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.'
-
-describe('pairRedeem from the phone app with an http:// address', () => {
- it('says the app needs https://, without probing', async () => {
- const fetch = vi.fn(failed)
- vi.stubGlobal('fetch', fetch)
- const e = await pairRedeem('http://192.168.1.20:8080', 'ABCD2345').catch(x => x)
- expect(e.code).toBe('insecure')
- expect(e.message).toBe(MSG)
- expect(fetch).toHaveBeenCalledTimes(1)
- })
-
- it('an https:// address that fails is still probed as before', async () => {
- vi.stubGlobal('fetch', vi.fn(failed))
- const e = await pairRedeem('https://gym.example.com', 'ABCD2345', { probeMs: 20 }).catch(x => x)
- expect(e.code).toBe('unreachable')
- })
-
- it('http://localhost counts as secure and is not blamed', async () => {
- vi.stubGlobal('fetch', vi.fn(failed))
- const e = await pairRedeem('http://localhost:8080', 'ABCD2345', { probeMs: 20 }).catch(x => x)
- expect(e.code).toBe('unreachable')
- })
-
- it('a server that answers over http:// is passed on as it is', async () => {
- vi.stubGlobal('fetch', vi.fn(async () => new Response(JSON.stringify({ error: 'invalid or expired code' }), { status: 400, headers: { 'content-type': 'application/json' } })))
- await expect(pairRedeem('http://192.168.1.20:8080', 'ABCD2345')).rejects.toMatchObject({ status: 400 })
- })
-
- it('off the native app the http:// case is not claimed', async () => {
- h.native = false
- vi.stubGlobal('fetch', vi.fn(failed))
- const e = await pairRedeem('http://192.168.1.20:8080', 'ABCD2345', { probeMs: 20 }).catch(x => x)
- expect(e.code).toBe('unreachable')
- })
-})
diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.js
index b92f6745e..bce5006b9 100644
--- a/frontend/src/locales/ar.js
+++ b/frontend/src/locales/ar.js
@@ -1836,7 +1836,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'عضلاتك أبلغت عن فقدانك. احضر إلى {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'هذا العنوان يستجيب، لكنه ليس خادم openGym. تحقّق من الرابط.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'هذا العنوان يستجيب، لكن صفحة تسجيل دخول أو قاعدة في البروكسي ردّت بدلًا من openGym. اترك /api/ يصل إلى openGym دون تغيير. راجع “Phone app and CORS” في docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'لا يمكن للتطبيق الاقتران إلا بعنوان https://. هاتفك يحظر http:// العادي قبل إرسال أي شيء.',
'Switch sides': 'بدّل الجهة',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'يحفظ نسخة مؤرّخة في «{0}» بعد إنهاء تمرين أو تعديل روتين، ويحتفظ بأحدث {1}.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'يحفظ نسخة مؤرّخة في المجلد الذي اخترته بعد إنهاء تمرين أو تعديل روتين، ويحتفظ بأحدث {0}.',
@@ -2003,4 +2002,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'تظهر الألوان الرمادية أغمق في الوضع الفاتح، حتى لا تبدو الأزرار مُعطّلة.',
'custom color picker': 'لون خاص مخصص منتقي الألوان',
'Signed in from another tab. Your workout came along, keep going here.': 'تم تسجيل الدخول من علامة تبويب أخرى. تمرينك انتقل معك، تابعه هنا.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'اتصال http:// العادي غير مشفّر. لا بأس به على شبكة منزلك، لكن استخدم https:// إذا كان خادمك متاحًا من الإنترنت.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'تعذّر الوصول إلى {0} عبر https://. إذا كان خادمك يعمل بـ http عادي (شائع في المنزل)، فاكتب http://{0} بدلًا من ذلك.',
}
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 7fdb20e04..094f0f8e7 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -1803,7 +1803,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Deine Muskeln haben eine Vermisstenanzeige aufgegeben. Antreten zu {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Unter dieser Adresse antwortet etwas, aber kein openGym-Server. Prüf die URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Unter dieser Adresse antwortet etwas, aber eine Login-Seite oder Proxy-Regel statt openGym. Lass /api/ unverändert zu openGym durch. Siehe “Phone app and CORS” in docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'Die App kann sich nur mit einer https://-Adresse verbinden. Dein Handy blockiert einfaches http://, bevor überhaupt etwas gesendet wird.',
'Switch sides': 'Seite wechseln',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Speichert nach jedem beendeten Training oder jeder bearbeiteten Routine eine datierte Kopie in „{0}“ und behält die neuesten {1}.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Speichert nach jedem beendeten Training oder jeder bearbeiteten Routine eine datierte Kopie im gewählten Ordner und behält die neuesten {0}.',
@@ -1970,4 +1969,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Grautöne werden im hellen Modus dunkler, damit Buttons nicht ausgeschaltet wirken.',
'custom color picker': 'eigene Farbe benutzerdefiniert Farbwähler Farbauswahl',
'Signed in from another tab. Your workout came along, keep going here.': 'In einem anderen Tab angemeldet. Dein Training ist mitgekommen, mach hier weiter.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'Einfaches http:// ist nicht verschlüsselt. Im Heimnetz okay, aber nimm https://, wenn dein Server aus dem Internet erreichbar ist.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': '{0} ist über https:// nicht erreichbar. Läuft dein Server mit einfachem http (zu Hause üblich), gib stattdessen http://{0} ein.',
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 592a333e1..4783a5cde 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Tus músculos pusieron una denuncia por desaparición. ¡Preséntate a {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Esa dirección responde, pero no es un servidor de openGym. Revisa la URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Esa dirección responde, pero contestó una página de inicio de sesión o una regla del proxy en lugar de openGym. Deja pasar /api/ a openGym sin cambios. Mira “Phone app and CORS” en docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'La app solo puede vincularse con una dirección https://. Tu móvil bloquea http:// a secas antes de enviar nada.',
'Switch sides': 'Cambia de lado',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Guarda una copia con fecha en «{0}» al terminar un entreno o editar una rutina, y conserva las {1} más recientes.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Guarda una copia con fecha en la carpeta que elegiste al terminar un entreno o editar una rutina, y conserva las {0} más recientes.',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Los grises se ven más oscuros en modo claro, para que los botones no parezcan apagados.',
'custom color picker': 'color propio personalizado selector de color',
'Signed in from another tab. Your workout came along, keep going here.': 'Sesión iniciada en otra pestaña. Tu entreno vino contigo, sigue aquí.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'El http:// simple no está cifrado. Vale en tu red de casa, pero usa https:// si tu servidor es accesible desde internet.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'No se pudo conectar con {0} por https://. Si tu servidor usa http simple (habitual en casa), escribe http://{0}.',
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index a6c2a3d84..374d5f3d1 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Vos muscles ont signalé votre disparition. Présentez-vous pour {0} !',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Cette adresse répond, mais ce n’est pas un serveur openGym. Vérifie l’URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Cette adresse répond, mais c’est une page de connexion ou une règle du proxy qui a répondu à la place d’openGym. Laisse passer /api/ vers openGym sans modification. Voir “Phone app and CORS” dans docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'L’app ne peut s’associer qu’à une adresse https://. Ton téléphone bloque le simple http:// avant même que quoi que ce soit parte.',
'Switch sides': 'Change de côté',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Enregistre une copie datée dans « {0} » après chaque séance terminée ou routine modifiée, et garde les {1} plus récentes.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Enregistre une copie datée dans le dossier choisi après chaque séance terminée ou routine modifiée, et garde les {0} plus récentes.',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Les gris foncent en mode clair, pour que les boutons n’aient pas l’air éteints.',
'custom color picker': 'couleur perso personnalisée sélecteur nuancier',
'Signed in from another tab. Your workout came along, keep going here.': 'Connecté depuis un autre onglet. Ta séance a suivi, continue ici.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'Le http:// simple n’est pas chiffré. Ça passe sur ton réseau domestique, mais utilise https:// si ton serveur est accessible depuis Internet.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'Impossible de joindre {0} en https://. Si ton serveur tourne en http simple (courant à la maison), tape plutôt http://{0}.',
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 8c05a4933..c73b99263 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'आपकी मांसपेशियों ने गुमशुदगी की रिपोर्ट लिखाई है। {0} के लिए हाज़िर हो!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'यह पता जवाब देता है, लेकिन यह openGym सर्वर नहीं है। URL जाँचें।',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'यह पता जवाब देता है, लेकिन openGym की जगह किसी लॉगिन पेज या प्रॉक्सी नियम ने जवाब दिया। /api/ को बिना बदलाव openGym तक जाने दें। docs/SELF_HOSTING.md में “Phone app and CORS” देखें।',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'ऐप सिर्फ़ https:// पते से ही जुड़ सकता है। आपका फ़ोन सादे http:// को कुछ भी भेजे जाने से पहले ही रोक देता है।',
'Switch sides': 'साइड बदलें',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'हर वर्कआउट पूरा होने या रूटीन बदलने के बाद “{0}” में तारीख वाली कॉपी सेव करता है और सबसे नई {1} रखता है।',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'हर वर्कआउट पूरा होने या रूटीन बदलने के बाद आपके चुने फ़ोल्डर में तारीख वाली कॉपी सेव करता है और सबसे नई {0} रखता है।',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'लाइट मोड में ग्रे रंग गहरे दिखते हैं, ताकि बटन बंद जैसे न लगें।',
'custom color picker': 'अपना रंग कस्टम रंग चुनने वाला',
'Signed in from another tab. Your workout came along, keep going here.': 'दूसरे टैब से साइन इन हुआ। आपका वर्कआउट साथ आ गया, यहीं जारी रखें।',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'सादा http:// एन्क्रिप्टेड नहीं है। घर के नेटवर्क पर ठीक है, लेकिन अगर आपका सर्वर इंटरनेट से पहुँचा जा सकता है तो https:// इस्तेमाल करें।',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'https:// से {0} तक नहीं पहुँच सके। अगर आपका सर्वर सादे http पर चलता है (घर पर आम है), तो इसकी जगह http://{0} लिखें।',
}
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index 3b8a3698f..35b0bd8fc 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -1786,7 +1786,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Az izmaid eltűntként jelentettek. Jelentkezz: {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Ez a cím válaszol, de nem openGym-szerver. Ellenőrizd az URL-t.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Ez a cím válaszol, de openGym helyett egy bejelentkezési oldal vagy proxyszabály felelt. Engedd át a /api/ útvonalat változatlanul az openGymhez. Lásd: “Phone app and CORS”, docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'Az app csak https:// címmel tud párosodni. A telefonod a sima http://-t már azelőtt letiltja, hogy bármi elmenne.',
'Switch sides': 'Oldalcsere',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Minden befejezett edzés vagy rutinmódosítás után dátumozott másolatot ment ide: „{0}”, és a legújabb {1} darabot megtartja.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Minden befejezett edzés vagy rutinmódosítás után dátumozott másolatot ment a választott mappába, és a legújabb {0} darabot megtartja.',
@@ -1953,4 +1952,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'A szürkék világos módban sötétebbek, hogy a gombok ne tűnjenek kikapcsoltnak.',
'custom color picker': 'saját szín egyéni színválasztó',
'Signed in from another tab. Your workout came along, keep going here.': 'Bejelentkeztél egy másik lapon. Az edzésed is jött vele, folytasd itt.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'A sima http:// nem titkosított. Otthoni hálózaton rendben van, de használj https://-t, ha a szervered elérhető az internetről.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'A(z) {0} nem érhető el https://-en. Ha a szervered sima http-n fut (otthon gyakori), írd be inkább: http://{0}.',
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index 81f392217..c746cb904 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'I tuoi muscoli hanno denunciato la tua scomparsa. Presentati a {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Quell’indirizzo risponde, ma non è un server openGym. Controlla l’URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Quell’indirizzo risponde, ma al posto di openGym ha risposto una pagina di login o una regola del proxy. Lascia passare /api/ fino a openGym senza modifiche. Vedi “Phone app and CORS” in docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'L’app può collegarsi solo a un indirizzo https://. Il telefono blocca il semplice http:// prima ancora di inviare qualcosa.',
'Switch sides': 'Cambia lato',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Salva una copia datata in “{0}” dopo ogni allenamento finito o routine modificata, e tiene le {1} più recenti.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Salva una copia datata nella cartella che hai scelto dopo ogni allenamento finito o routine modificata, e tiene le {0} più recenti.',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'I grigi diventano più scuri in modalità chiara, così i pulsanti non sembrano spenti.',
'custom color picker': 'colore personalizzato proprio selettore colore',
'Signed in from another tab. Your workout came along, keep going here.': 'Accesso fatto da un’altra scheda. Il tuo allenamento è venuto con te, continua qui.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'Il semplice http:// non è cifrato. Va bene sulla rete di casa, ma usa https:// se il tuo server è raggiungibile da internet.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'Impossibile raggiungere {0} via https://. Se il tuo server usa http semplice (comune in casa), scrivi http://{0}.',
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index fc4f356c8..8ee658879 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': '근육들이 실종 신고를 냈다. {0}에 출석하라!',
'That address answers, but it isn’t an openGym server. Check the URL.': '이 주소는 응답하지만 openGym 서버가 아닙니다. URL을 확인하세요.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': '이 주소는 응답하지만 openGym 대신 로그인 페이지나 프록시 규칙이 응답했습니다. /api/ 를 그대로 openGym까지 통과시켜 주세요. docs/SELF_HOSTING.md의 “Phone app and CORS”를 참고하세요.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': '앱은 https:// 주소로만 연결할 수 있습니다. 휴대폰이 일반 http:// 요청을 보내기도 전에 차단합니다.',
'Switch sides': '방향 바꾸기',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': '운동을 마치거나 루틴을 수정할 때마다 “{0}”에 날짜가 붙은 사본을 저장하고 최신 {1}개를 보관합니다.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': '운동을 마치거나 루틴을 수정할 때마다 선택한 폴더에 날짜가 붙은 사본을 저장하고 최신 {0}개를 보관합니다.',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': '라이트 모드에서는 버튼이 꺼진 것처럼 보이지 않게 회색을 어둡게 표시해요.',
'custom color picker': '나만의 색상 사용자 지정 색상 선택기',
'Signed in from another tab. Your workout came along, keep going here.': '다른 탭에서 로그인했어요. 운동도 함께 넘어왔으니 여기서 이어서 하세요.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': '일반 http://는 암호화되지 않아요. 집 네트워크에서는 괜찮지만, 서버가 인터넷에서 접속 가능하다면 https://를 쓰세요.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'https://로 {0}에 연결할 수 없습니다. 서버가 일반 http로 돌아간다면(집에서는 흔해요) 대신 http://{0}를 입력하세요.',
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 92579d18f..12b6a6ea8 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Twoje mięśnie zgłosiły twoje zaginięcie. Stawić się na „{0}”!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Ten adres odpowiada, ale to nie jest serwer openGym. Sprawdź URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Ten adres odpowiada, ale zamiast openGym odpowiedziała strona logowania albo reguła proxy. Przepuść /api/ do openGym bez zmian. Zobacz “Phone app and CORS” w docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'Aplikacja może się połączyć tylko z adresem https://. Telefon blokuje zwykłe http:// zanim cokolwiek zostanie wysłane.',
'Switch sides': 'Zmień stronę',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Zapisuje kopię z datą w „{0}” po każdym zakończonym treningu lub edycji planu i trzyma {1} najnowszych.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Zapisuje kopię z datą w wybranym folderze po każdym zakończonym treningu lub edycji planu i trzyma {0} najnowszych.',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Szarości są ciemniejsze w trybie jasnym, żeby przyciski nie wyglądały na wyłączone.',
'custom color picker': 'własny kolor niestandardowy próbnik wybór koloru',
'Signed in from another tab. Your workout came along, keep going here.': 'Zalogowano w innej karcie. Twój trening przeszedł razem z kontem, kontynuuj tutaj.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'Zwykłe http:// nie jest szyfrowane. W domowej sieci w porządku, ale użyj https://, jeśli twój serwer jest dostępny z internetu.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'Nie udało się połączyć z {0} przez https://. Jeśli twój serwer działa na zwykłym http (częste w domu), wpisz http://{0}.',
}
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index c2c52d5f7..cc034700e 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -1122,7 +1122,6 @@ export const PT_BR_OVERRIDES = {
'{1} animated exercises + {0} of your own': '{1} exercícios animados + {0} seus',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Esse endereço responde, mas não é um servidor openGym. Verifique a URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Esse endereço responde, mas quem respondeu foi uma página de login ou uma regra do proxy, não o openGym. Deixe o /api/ chegar ao openGym sem alterações. Veja “Phone app and CORS” em docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'O app só consegue parear com um endereço https://. Seu celular bloqueia http:// simples antes de enviar qualquer coisa.',
'Switch sides': 'Troque de lado',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Salva uma cópia datada em “{0}” depois de terminar um treino ou editar uma rotina, e mantém as {1} mais recentes.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Salva uma cópia datada na pasta que você escolheu depois de terminar um treino ou editar uma rotina, e mantém as {0} mais recentes.',
@@ -1212,6 +1211,8 @@ export const PT_BR_OVERRIDES = {
'Greys show lighter in dark mode, so buttons don’t look switched off.': 'Os cinzas ficam mais claros no modo escuro, para os botões não parecerem desligados.',
'Greys show darker in light mode, so buttons don’t look switched off.': 'Os cinzas ficam mais escuros no modo claro, para os botões não parecerem desligados.',
'Signed in from another tab. Your workout came along, keep going here.': 'Login feito em outra aba. Seu treino veio junto, continue por aqui.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'O http:// simples não é criptografado. Tudo bem na sua rede de casa, mas use https:// se o seu servidor estiver acessível pela internet.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'Não foi possível alcançar {0} por https://. Se o seu servidor usa http simples (comum em casa), digite http://{0}.',
}
export default { ...pt, ...PT_BR_OVERRIDES }
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index ad06595ac..ccc61d949 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Os teus músculos deram-te como desaparecido. Apresenta-te para {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Esse endereço responde, mas não é um servidor openGym. Verifica o URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Esse endereço responde, mas foi uma página de login ou uma regra do proxy que respondeu em vez do openGym. Deixa o /api/ chegar ao openGym sem alterações. Vê “Phone app and CORS” em docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'A app só consegue emparelhar com um endereço https://. O telemóvel bloqueia http:// simples antes de enviar seja o que for.',
'Switch sides': 'Troca de lado',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Guarda uma cópia datada em «{0}» depois de terminares um treino ou editares uma rotina, e mantém as {1} mais recentes.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Guarda uma cópia datada na pasta que escolheste depois de terminares um treino ou editares uma rotina, e mantém as {0} mais recentes.',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Os cinzentos ficam mais escuros no modo claro, para os botões não parecerem desligados.',
'custom color picker': 'cor própria personalizada seletor de cor',
'Signed in from another tab. Your workout came along, keep going here.': 'Sessão iniciada noutro separador. O teu treino veio junto, continua aqui.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'O http:// simples não é encriptado. Serve na tua rede de casa, mas usa https:// se o teu servidor estiver acessível pela internet.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'Não foi possível alcançar {0} por https://. Se o teu servidor usa http simples (comum em casa), escreve http://{0}.',
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index 576e5cbe6..da64726f9 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -1787,7 +1787,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Ваши мышцы подали заявление о пропаже. Явиться на «{0}»!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'По этому адресу что-то отвечает, но это не сервер openGym. Проверьте URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'По этому адресу отвечает страница входа или правило прокси, а не openGym. Пропустите /api/ до openGym без изменений. См. “Phone app and CORS” в docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'Приложение может подключиться только к адресу https://. Телефон блокирует обычный http:// ещё до того, как что-то будет отправлено.',
'Switch sides': 'Смените сторону',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Сохраняет копию с датой в «{0}» после каждой тренировки или правки программы и хранит {1} последних.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Сохраняет копию с датой в выбранную папку после каждой тренировки или правки программы и хранит {0} последних.',
@@ -1954,4 +1953,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Серые оттенки в светлой теме темнее, чтобы кнопки не казались выключенными.',
'custom color picker': 'свой цвет пользовательский палитра выбор цвета',
'Signed in from another tab. Your workout came along, keep going here.': 'Вход выполнен в другой вкладке. Тренировка сохранилась, продолжай здесь.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'Обычный http:// не шифруется. Для домашней сети это нормально, но если сервер доступен из интернета, используйте https://.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'Не удалось связаться с {0} по https://. Если ваш сервер работает на обычном http (дома так часто бывает), введите http://{0}.',
}
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index 1031f9448..811929bf7 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -1794,7 +1794,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'กล้ามเนื้อของคุณแจ้งคนหายแล้ว มารายงานตัวที่ {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'ที่อยู่นี้ตอบกลับ แต่ไม่ใช่เซิร์ฟเวอร์ openGym ตรวจสอบ URL อีกครั้ง',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'ที่อยู่นี้ตอบกลับ แต่เป็นหน้าเข้าสู่ระบบหรือกฎของพร็อกซีที่ตอบแทน openGym ให้ /api/ ผ่านไปถึง openGym โดยไม่เปลี่ยนแปลง ดู “Phone app and CORS” ใน docs/SELF_HOSTING.md',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'แอปจับคู่ได้เฉพาะกับที่อยู่ https:// เท่านั้น โทรศัพท์ของคุณบล็อก http:// ธรรมดาก่อนที่จะส่งอะไรออกไปเลย',
'Switch sides': 'สลับข้าง',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'บันทึกสำเนาพร้อมวันที่ไว้ใน “{0}” ทุกครั้งที่จบการออกกำลังกายหรือแก้รูทีน และเก็บไว้ {1} ชุดล่าสุด',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'บันทึกสำเนาพร้อมวันที่ไว้ในโฟลเดอร์ที่คุณเลือกทุกครั้งที่จบการออกกำลังกายหรือแก้รูทีน และเก็บไว้ {0} ชุดล่าสุด',
@@ -1961,4 +1960,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'สีเทาจะเข้มขึ้นในโหมดสว่าง ปุ่มจะได้ไม่ดูเหมือนถูกปิดอยู่',
'custom color picker': 'สีเอง กำหนดเอง ตัวเลือกสี',
'Signed in from another tab. Your workout came along, keep going here.': 'ลงชื่อเข้าใช้จากแท็บอื่นแล้ว การออกกำลังกายของคุณมาด้วย ทำต่อที่นี่ได้เลย',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'http:// ธรรมดาไม่ได้เข้ารหัส ใช้ในเครือข่ายที่บ้านได้ แต่ถ้าเซิร์ฟเวอร์ของคุณเข้าถึงได้จากอินเทอร์เน็ต ให้ใช้ https://',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'เชื่อมต่อ {0} ผ่าน https:// ไม่ได้ ถ้าเซิร์ฟเวอร์ของคุณใช้ http ธรรมดา (พบบ่อยที่บ้าน) ให้พิมพ์ http://{0} แทน',
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index d6fa067cf..6bf278090 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Kasların kayıp ilanı verdi. {0} için içtimaya gel!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Bu adres yanıt veriyor ama bir openGym sunucusu değil. URL’yi kontrol et.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Bu adres yanıt veriyor ama openGym yerine bir giriş sayfası ya da proxy kuralı yanıt verdi. /api/ yolunu openGym’e değiştirmeden geçir. docs/SELF_HOSTING.md içinde “Phone app and CORS” bölümüne bak.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'Uygulama yalnızca https:// adresiyle eşleşebilir. Telefonun düz http:// isteğini daha hiçbir şey gönderilmeden engelliyor.',
'Switch sides': 'Taraf değiştir',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Her antrenman bitince veya rutin düzenlenince «{0}» klasörüne tarihli bir kopya kaydeder ve en yeni {1} kopyayı tutar.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Her antrenman bitince veya rutin düzenlenince seçtiğin klasöre tarihli bir kopya kaydeder ve en yeni {0} kopyayı tutar.',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Griler aydınlık modda daha koyu görünür, düğmeler kapalıymış gibi durmasın diye.',
'custom color picker': 'kendi renk özel renk seçici',
'Signed in from another tab. Your workout came along, keep going here.': 'Başka bir sekmede giriş yapıldı. Antrenmanın da geldi, buradan devam et.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'Düz http:// şifreli değildir. Ev ağında sorun değil, ama sunucun internetten erişilebiliyorsa https:// kullan.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': '{0} adresine https:// üzerinden ulaşılamadı. Sunucun düz http ile çalışıyorsa (evde yaygın), bunun yerine http://{0} yaz.',
}
diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.js
index a4a775ede..a437f9994 100644
--- a/frontend/src/locales/uk.js
+++ b/frontend/src/locales/uk.js
@@ -1780,7 +1780,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': 'Твої м’язи заявили про твоє зникнення. З’явитися на «{0}»!',
'That address answers, but it isn’t an openGym server. Check the URL.': 'Ця адреса відповідає, але це не сервер openGym. Перевір URL.',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': 'Ця адреса відповідає, але замість openGym відповіла сторінка входу або правило проксі. Пропусти /api/ до openGym без змін. Див. “Phone app and CORS” у docs/SELF_HOSTING.md.',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'Застосунок може підключитися лише до адреси https://. Телефон блокує звичайний http:// ще до того, як щось буде надіслано.',
'Switch sides': 'Зміни сторону',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': 'Зберігає копію з датою в «{0}» після кожного тренування чи зміни програми й тримає {1} найновіших.',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': 'Зберігає копію з датою у вибрану теку після кожного тренування чи зміни програми й тримає {0} найновіших.',
@@ -1947,4 +1946,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': 'Сірі відтінки у світлій темі темніші, щоб кнопки не здавалися вимкненими.',
'custom color picker': 'свій колір власний палітра вибір кольору',
'Signed in from another tab. Your workout came along, keep going here.': 'Вхід виконано в іншій вкладці. Тренування збережено, продовжуй тут.',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': 'Звичайний http:// не шифрується. Для домашньої мережі це нормально, але якщо сервер доступний з інтернету, використовуй https://.',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': 'Не вдалося зв’язатися з {0} через https://. Якщо твій сервер працює на звичайному http (вдома так часто буває), введи http://{0}.',
}
diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.js
index 0ab17d0bf..d1f72a083 100644
--- a/frontend/src/locales/zh-TW.js
+++ b/frontend/src/locales/zh-TW.js
@@ -1776,7 +1776,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': '你的肌肉已經報案協尋你了。馬上來練 {0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': '這個位址有回應,但不是 openGym 伺服器。請檢查網址。',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': '這個位址有回應,但回應的是登入頁面或代理規則,而不是 openGym。請讓 /api/ 原封不動地通到 openGym。參見 docs/SELF_HOSTING.md 中的“Phone app and CORS”。',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': 'App 只能與 https:// 位址配對。手機會在送出任何內容之前就擋下一般的 http://。',
'Switch sides': '換邊',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': '每次完成訓練或修改課表後,在「{0}」中儲存一份附日期的副本,並保留最新的 {1} 份。',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': '每次完成訓練或修改課表後,在你選擇的資料夾中儲存一份附日期的副本,並保留最新的 {0} 份。',
@@ -1943,4 +1942,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': '淺色模式下灰色會調暗一些,免得按鈕看起來像被停用了。',
'custom color picker': '自訂顏色 自己的顏色 取色器 調色盤',
'Signed in from another tab. Your workout came along, keep going here.': '已在另一個分頁登入。你的訓練也一起帶過去了,在這裡繼續吧。',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': '一般 http:// 沒有加密。在家用網路裡沒問題,但如果你的伺服器可以從網際網路連到,請用 https://。',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': '無法透過 https:// 連到 {0}。如果你的伺服器使用一般 http(在家裡很常見),請改輸入 http://{0}。',
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index 07765586e..15b57efca 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -1783,7 +1783,6 @@ export default {
'Your muscles filed a missing-person report. Show up for {0}!': '你的肌肉已经报了失踪。马上来练{0}!',
'That address answers, but it isn’t an openGym server. Check the URL.': '该地址有响应,但不是 openGym 服务器。请检查网址。',
'That address answers, but a login page or proxy rule replied instead of openGym. Let /api/ through to openGym unchanged. See “Phone app and CORS” in docs/SELF_HOSTING.md.': '该地址有响应,但回应的是登录页面或代理规则,而不是 openGym。请让 /api/ 原样直达 openGym。参见 docs/SELF_HOSTING.md 中的“Phone app and CORS”。',
- 'The app can only pair with an https:// address. Your phone blocks plain http:// before anything is even sent.': '应用只能与 https:// 地址配对。手机会在发送任何内容之前就拦截普通的 http://。',
'Switch sides': '换边',
'Saves a dated copy to “{0}” after finishing a workout or editing a routine, and keeps the newest {1}.': '每次完成训练或修改计划后,在“{0}”中保存一份带日期的副本,并保留最新的 {1} 份。',
'Saves a dated copy to the folder you chose after finishing a workout or editing a routine, and keeps the newest {0}.': '每次完成训练或修改计划后,在你选择的文件夹中保存一份带日期的副本,并保留最新的 {0} 份。',
@@ -1950,4 +1949,6 @@ export default {
'Greys show darker in light mode, so buttons don’t look switched off.': '浅色模式下灰色会调暗一些,免得按钮看起来像被停用了。',
'custom color picker': '自定义颜色 自己的颜色 取色器 调色板',
'Signed in from another tab. Your workout came along, keep going here.': '已在另一个标签页登录。你的训练也一起带过去了,在这里继续吧。',
+ 'Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.': '普通 http:// 不加密。在家庭网络里没问题,但如果你的服务器能从互联网访问,请用 https://。',
+ 'Could not reach {0} over https://. If your server runs on plain http (common at home), type http://{0} instead.': '无法通过 https:// 连接 {0}。如果你的服务器使用普通 http(在家里很常见),请改为输入 http://{0}。',
}
diff --git a/frontend/src/views/MobileOnboarding.http.test.js b/frontend/src/views/MobileOnboarding.http.test.js
new file mode 100644
index 000000000..d90cca8f5
--- /dev/null
+++ b/frontend/src/views/MobileOnboarding.http.test.js
@@ -0,0 +1,21 @@
+// @vitest-environment happy-dom
+// #428: pairing with a plain http:// server works now; the connect sheet only says, once, that
+// http is not encrypted. Not for https://, a bare address (tried as https://) or the phone itself.
+import { describe, expect, it, vi } from 'vitest'
+
+vi.mock('../store/useStore.js', () => ({ useStore: () => ({}) }))
+vi.mock('../store/useUI.js', () => ({ useUI: { getState: () => ({}) } }))
+vi.mock('../sheets.jsx', () => ({ askAddDeviceData: () => {} }))
+vi.mock('../components/Icon.jsx', () => ({ default: () => null }))
+vi.mock('../components/ui.jsx', () => ({ Button: () => null }))
+
+const { plainHttp } = await import('./MobileOnboarding.jsx')
+
+describe('plainHttp', () => {
+ it('warns for an http:// server on the network', () => {
+ for (const a of ['http://192.168.1.20:8080', ' HTTP://nas.local/ ', 'http://gym.example.com']) expect(plainHttp(a), a).toBe(true)
+ })
+ it('stays quiet for https://, a bare address, the phone itself and nonsense', () => {
+ for (const a of ['https://gym.example.com', '192.168.1.20:8080', 'http://localhost:3000', 'http://127.0.0.1', 'http://[::1]:8080', 'http://', '', null]) expect(plainHttp(a), String(a)).toBe(false)
+ })
+})
diff --git a/frontend/src/views/MobileOnboarding.jsx b/frontend/src/views/MobileOnboarding.jsx
index af03ac4b1..25e6eb0b8 100644
--- a/frontend/src/views/MobileOnboarding.jsx
+++ b/frontend/src/views/MobileOnboarding.jsx
@@ -8,6 +8,17 @@ import { t } from '../lib/i18n.js'
import Icon from '../components/Icon.jsx'
import { Button } from '../components/ui.jsx'
import { askAddDeviceData } from '../sheets.jsx'
+import { normalizeServerUrl } from '../lib/remote.js'
+
+// A plain http:// server works (#428), but whatever the app sends, the pairing code and then its
+// token, crosses the network readable. Said once under the field, not in the way: on a home
+// network that is often a fine trade. localhost is the phone itself and needs no warning.
+export function plainHttp(raw) {
+ const base = /^\s*http:\/\//i.test(String(raw || '')) ? normalizeServerUrl(raw) : null
+ if (!base) return false
+ const host = new URL(base).hostname
+ return !/^(localhost|127\.\d+\.\d+\.\d+|\[::1\])$/i.test(host)
+}
// `again`: a phone whose server stopped accepting it (components/ServerSync.jsx pairAgain) — the
// address it had is filled in when it still has one, so only the new code is left to type, and
@@ -40,6 +51,9 @@ export function ConnectSheet({ close, initialUrl = '', again = false }) {
</div>
<input ref={ref} className="input" placeholder={t('Server address (e.g. gym.example.com)')} value={url}
onChange={e => setUrl(e.target.value)} autoCapitalize="none" autoCorrect="off" inputMode="url" />
+ {plainHttp(url) && <div className="dim small" role="note" style={{ marginTop: 8, lineHeight: 1.45 }}>
+ {t('Plain http:// isn’t encrypted. Fine on your home network, but use https:// if your server is reachable from the internet.')}
+ </div>}
<div style={{ height: 10 }} />
<input ref={codeRef} className="input" placeholder={t('Pairing code')} maxLength={8} value={code}
onChange={e => setCode(e.target.value.toUpperCase())} style={{ letterSpacing: '.14em', fontWeight: 600, textAlign: 'center' }} />