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
21 lines
1.2 KiB
Ucode
21 lines
1.2 KiB
Ucode
// dawnline.view: which device a portal page was opened from.
|
|
import * as view from 'dawnline.view';
|
|
|
|
const devs = [
|
|
{ id: 'd_1', address: '10.0.0.2', online: true, endpoint: '203.0.113.7' },
|
|
{ id: 'd_2', address: '10.0.0.3', online: false, endpoint: '198.51.100.4' },
|
|
{ id: 'd_3', address: '10.0.0.4', online: true, endpoint: '192.0.2.9' },
|
|
];
|
|
|
|
test('device_here', () => {
|
|
eq(view.device_here(devs, '10.0.0.3'), 'd_2', 'through the tunnel: its address, online or not');
|
|
eq(view.device_here(devs, '203.0.113.7'), 'd_1', 'beside the tunnel: where its tunnel comes from');
|
|
eq(view.device_here(devs, '::ffff:203.0.113.7'), 'd_1', 'an IPv4 request on a dual-stack socket');
|
|
eq(view.device_here(devs, '198.51.100.4'), null, 'a device that is not online does not count');
|
|
eq(view.device_here(devs, '233.252.0.1'), null, 'from elsewhere');
|
|
eq(view.device_here([ ...devs, { id: 'd_4', address: '10.0.0.5', online: true, endpoint: '203.0.113.7' } ], '203.0.113.7'), null,
|
|
'two devices behind one address: neither');
|
|
eq(view.device_here(devs, ''), null, 'no address');
|
|
eq(view.device_here([ { id: 'd_5', address: '10.0.0.6', online: true, endpoint: '' } ], ''), null, 'no address, no endpoint');
|
|
});
|