Dawnline 0.9.0
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions

- Portal: Reconnect replaces New keys and the connection sheet (QR, Key,
  File, and the menu's QR, key and .conf items). It gives the device new
  keys, shows it as "Not set up yet" until it connects with them (in the
  admin too) and opens the set-up sheet on the new configuration; "Update
  the connection" goes the same way. Reconnect is orange in the menu
- iPhone: "Open in AmneziaVPN" is "Send to AmneziaVPN": the key goes in as
  a .vpn file from the share sheet. AmneziaVPN takes vpn:// links only on
  Android; on iOS Safari said the address was invalid, or another app that
  claims vpn:// got the key. The desktop "Open in AmneziaVPN" link is gone
- A computer set up from a phone: get the app, add the connection, then
  "Or open your link on the computer"; "Another app" offers AmneziaWG and
  WireGuard there too and step 2 follows the pick. "Other" devices pick any
  system (iPhone/iPad, Android, Windows, Mac, Linux); the page counts as the
  device in hand only when the pick is its own system
- Import steps in each app's own words (iOS "+ → Create from file or
  archive", Android "+ → Import from file or archive", Mac, Windows "Add
  Tunnel → Import tunnel(s) from file"); Linux gets the awg-quick command
- Files are shared only on iOS (on Android the apps take no shared files:
  a download there), and alone: with a title, "Save to Files" also wrote
  the title as a .txt
- Files and tunnels are named after the server ("Outline Home" →
  Outline-Home.conf and .vpn) in the form every client accepts: letters,
  digits and "-", 15 characters, no Windows device names. The admin's
  downloads keep the device in the name. The AmneziaVPN key's description
  is the server's name alone
- The AmneziaVPN QR code holds the key without "vpn://": AmneziaVPN's
  scanner decodes the text as it is and failed on the prefix
- "This device" also when the page is opened beside the tunnel: the apps
  route the VPN's own address, which the portal shares, around their
  tunnel, so the one online device whose tunnel comes from the page's
  address is the one
- Fixed: "Already has AmneziaVPN?Copy the key" lost its space
This commit is contained in:
Aemeath committed 2026-10-19 05:19:08 +03:00
1 parent 7a6370aa9e
commit edeb1506fd
22 files changed
+401 -486

No files matched your search

+60 -6
View File
@@ -33,8 +33,13 @@ export function sameDevice(kind: Kind, platform: Platform): boolean {
return true;
}
/** The systems a kind may run: a computer's is the person's call, the rest are read from the browser. */
export const osGroup = (kind: Kind): Platform[] => (kind === 'computer' || kind === 'other' ? ['windows', 'mac', 'linux'] : []);
/**
* The systems a kind may run, when that is the person's call: a computer's
* desktop systems, any system for an "other" device (a TV box runs Android, a
* NAS Linux). A phone's or a tablet's is read from the browser.
*/
export const osGroup = (kind: Kind): Platform[] =>
kind === 'computer' ? ['windows', 'mac', 'linux'] : kind === 'other' ? ['ios', 'android', 'windows', 'mac', 'linux'] : [];
export interface AppChoice {
id: AppId;
@@ -154,10 +159,59 @@ export const routerStore = (app: AppId): Store =>
}
: { href: 'https://openwrt.org/packages/start', top: 'OpenWrt packages', main: 'amneziawg-tools + kmod', mark: 'openwrt' };
/** Inside the app: where the scanner and the importer are. */
export const scanPath = (app: AppId): string =>
app === 'vpn' ? 'Add server → Scan QR' : app === 'awg' ? 'Add tunnel → Scan QR code' : 'Add tunnel → Create from QR code';
export const importPath = (app: AppId): string => (app === 'vpn' ? 'Add server → Insert key' : 'Add tunnel → Import from file');
/**
* Does AmneziaVPN here open a `vpn://` link? Only the Android app registers the
* scheme: on iOS, macOS and Windows the link opens nothing ("the address is
* invalid"), or another app that claims vpn:// gets the key.
*/
export const opensKeyLinks = (platform: Platform): boolean => platform === 'android';
/** The key as a file for the share sheet: AmneziaVPN on iOS imports `.vpn` files (the key as text). */
export const keyFileName = (confName: string): string => `${confName.replace(/\.conf$/i, '')}.vpn`;
/*
* Inside the app: where the scanner and the importer are, as each platform's
* app words it. The WireGuard apps are the same apps as AmneziaWG (it is
* their fork), menus included.
*/
const TUNNEL_MENU: Partial<Record<Platform, { file: string; qr?: string }>> = {
ios: { file: '+ → Create from file or archive', qr: '+ → Create from QR code' },
android: { file: '+ → Import from file or archive', qr: '+ → Scan from QR code' },
mac: { file: '+ → Import tunnel(s) from file' },
windows: { file: 'Add Tunnel → Import tunnel(s) from file' },
};
/** Where the app scans a code; a phone of either kind gets both wordings. */
export function scanPath(app: AppId, platform: Platform = 'unknown'): string {
if (app === 'vpn') return 'Add server → Scan QR';
const qr = TUNNEL_MENU[platform]?.qr;
return qr ?? `${TUNNEL_MENU.ios!.qr} (Android: ${TUNNEL_MENU.android!.qr!.replace(/^.* → /, '')})`;
}
/** Where the app takes a file (AmneziaVPN: the key). */
export function importPath(app: AppId, platform: Platform = 'unknown'): string {
if (app === 'vpn') return 'Add server → Insert key';
return TUNNEL_MENU[platform]?.file ?? 'Add tunnel → Import from file';
}
/**
* The file into the app, step by step: [text, the part in bold]. Linux has no
* app, only the tools: the file goes up straight from where it was saved
* (its name is a valid interface name, see tunnel_name on the router).
*/
export function importSteps(app: AppId, platform: Platform, file: string, shared: boolean): [string, string][] {
if (platform === 'linux')
return [
['Open a terminal in the folder with the file', ''],
['Run ', `sudo ${app === 'wg' ? 'wg-quick' : 'awg-quick'} up ./${file}`],
];
const path = importPath(app, platform);
return [
[`Open ${APP_NAME[app]}`, ''],
[path.replace(/ → [^→]*$/, ' → '), path.replace(/^.* → /, '')],
[shared ? 'Confirm the import and connect' : 'Pick the file and connect', ''],
];
}
export const PLATFORM_LABEL: Record<Platform, string> = {
ios: 'iPhone / iPad',