fix(app)!: instances over plain HTTP are refused, but on this machine

What the app sends an instance (the proofs that sign in, the keys'
wrappings, every request a session carries) must not be read or changed on
the way, so an instance is reached over HTTPS, or over plain HTTP only on
this machine (localhost, 127.0.0.0/8, ::1), as Jellyfin servers are. An
address over plain HTTP elsewhere is refused before anything is sent there.
One kept from before is never opened: the app says why, and offers another
instance or removing it from the device, never dropping it silently.
Development builds still use their own instance over HTTP (an emulator
reaches the developer's machine as 10.0.2.2); releases never.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-21 14:35:21 +02:00
commit 4914df348e
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
5 changed files with 338 additions and 2 deletions

View file

@ -7,6 +7,10 @@
"instanceAnotherTagline": "Gib ihre Adresse ein",
"instanceAddress": "Adresse der Instanz",
"instanceAddressInvalid": "Das ist keine Adresse.",
"instanceAddressInsecure": "{app} erreicht Instanzen nur über HTTPS, damit unterwegs niemand mitliest oder verändert, was es sendet. Frag nach der HTTPS-Adresse der Instanz.",
"instanceInsecure": "{name} wird über einfaches HTTP erreicht, wo unterwegs mitgelesen und verändert werden könnte, was {app} sendet. Deshalb öffnet {app} es nicht mehr. Das Konto bleibt auf {name} und auf diesem Gerät. Nutze eine andere Instanz oder entferne diese von diesem Gerät.",
"instanceInsecureUseAnother": "Andere Instanz nutzen",
"instanceInsecureRemove": "Von diesem Gerät entfernen",
"instanceAddressRequired": "Gib die Adresse einer Instanz ein.",
"instanceContinue": "Weiter",
"instanceUnreachable": "Unter {name} antwortet keine Instanz von {app}.",

View file

@ -15,6 +15,27 @@
"instanceAnotherTagline": "Enter its address",
"instanceAddress": "Instance address",
"instanceAddressInvalid": "This isn't an address.",
"instanceAddressInsecure": "{app} reaches instances over HTTPS only, so that nobody on the way reads or changes what it sends. Ask for the instance's HTTPS address.",
"@instanceAddressInsecure": {
"placeholders": {
"app": {
"type": "String"
}
}
},
"instanceInsecure": "{name} is reached over plain HTTP, where anyone on the way could read and change what {app} sends, so {app} no longer opens it. Its account stays on {name} and on this device. Use another instance, or remove it from this device.",
"@instanceInsecure": {
"placeholders": {
"name": {
"type": "String"
},
"app": {
"type": "String"
}
}
},
"instanceInsecureUseAnother": "Use another instance",
"instanceInsecureRemove": "Remove from this device",
"instanceAddressRequired": "Enter the address of an instance.",
"instanceContinue": "Continue",
"instanceUnreachable": "No instance of {app} answers at {name}.",

View file

@ -145,6 +145,30 @@ abstract class HalkyonAppLocalizations {
/// **'This isn\'t an address.'**
String get instanceAddressInvalid;
/// No description provided for @instanceAddressInsecure.
///
/// In en, this message translates to:
/// **'{app} reaches instances over HTTPS only, so that nobody on the way reads or changes what it sends. Ask for the instance\'s HTTPS address.'**
String instanceAddressInsecure(String app);
/// No description provided for @instanceInsecure.
///
/// In en, this message translates to:
/// **'{name} is reached over plain HTTP, where anyone on the way could read and change what {app} sends, so {app} no longer opens it. Its account stays on {name} and on this device. Use another instance, or remove it from this device.'**
String instanceInsecure(String name, String app);
/// No description provided for @instanceInsecureUseAnother.
///
/// In en, this message translates to:
/// **'Use another instance'**
String get instanceInsecureUseAnother;
/// No description provided for @instanceInsecureRemove.
///
/// In en, this message translates to:
/// **'Remove from this device'**
String get instanceInsecureRemove;
/// No description provided for @instanceAddressRequired.
///
/// In en, this message translates to:

View file

@ -32,6 +32,22 @@ class HalkyonAppLocalizationsDe extends HalkyonAppLocalizations {
@override
String get instanceAddressInvalid => 'Das ist keine Adresse.';
@override
String instanceAddressInsecure(String app) {
return '$app erreicht Instanzen nur über HTTPS, damit unterwegs niemand mitliest oder verändert, was es sendet. Frag nach der HTTPS-Adresse der Instanz.';
}
@override
String instanceInsecure(String name, String app) {
return '$name wird über einfaches HTTP erreicht, wo unterwegs mitgelesen und verändert werden könnte, was $app sendet. Deshalb öffnet $app es nicht mehr. Das Konto bleibt auf $name und auf diesem Gerät. Nutze eine andere Instanz oder entferne diese von diesem Gerät.';
}
@override
String get instanceInsecureUseAnother => 'Andere Instanz nutzen';
@override
String get instanceInsecureRemove => 'Von diesem Gerät entfernen';
@override
String get instanceAddressRequired => 'Gib die Adresse einer Instanz ein.';

View file

@ -32,6 +32,22 @@ class HalkyonAppLocalizationsEn extends HalkyonAppLocalizations {
@override
String get instanceAddressInvalid => 'This isn\'t an address.';
@override
String instanceAddressInsecure(String app) {
return '$app reaches instances over HTTPS only, so that nobody on the way reads or changes what it sends. Ask for the instance\'s HTTPS address.';
}
@override
String instanceInsecure(String name, String app) {
return '$name is reached over plain HTTP, where anyone on the way could read and change what $app sends, so $app no longer opens it. Its account stays on $name and on this device. Use another instance, or remove it from this device.';
}
@override
String get instanceInsecureUseAnother => 'Use another instance';
@override
String get instanceInsecureRemove => 'Remove from this device';
@override
String get instanceAddressRequired => 'Enter the address of an instance.';