Invite links: starsync:// opens the app and asks to join; one app per profile; real invite address; clipboard pick-up
- starsync://host:port/?name=&pw= (PROTOCOL.md "Invite link"); the password only when ticked, never in logs - Linux: launcher entry takes x-scheme-handler/starsync (%u, StartupNotify) and becomes its xdg-mime default; Windows: HKCU\Software\Classes\starsync -> starsync.exe - InstanceLock: lock file + loopback handoff per profile folder; the running app comes up with the second start's activation token (Wayland/X11) or AllowSetForegroundWindow (Windows) - Sharing looks up the internet address (HTTPS services with fallbacks); members card picks Internet / Home network / VPN and says when the port needs forwarding - JoinOffers: link and clipboard prompt with /health, joins through ConnectFlow; dismissed clipboard invites kept as fingerprints Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d48915dc47
commit
6048fbe7d1
35 files changed
+1943
-181
No files matched your search
@@ -7,7 +7,7 @@ import '../app/app_graph.dart';
|
||||
import '../screens/home/connect_flow.dart';
|
||||
import '../screens/home/connect_status.dart';
|
||||
import '../screens/home/health_probe.dart';
|
||||
import '../session/invite.dart' show addressIn;
|
||||
import '../session/invite.dart' show addressIn, inviteIn;
|
||||
import '../session/navigation.dart' show Place;
|
||||
import '../state/connect_prefs.dart';
|
||||
import '../update/update_controller.dart';
|
||||
@@ -138,9 +138,17 @@ class JoinCard extends StatelessWidget {
|
||||
_join();
|
||||
}
|
||||
|
||||
/// An invite or "host:port" pasted into the address: split it.
|
||||
/// An invite (link or text) or "host:port" pasted into the address:
|
||||
/// split it (a link's password goes into the password field).
|
||||
void _onAddress(String v) {
|
||||
flow.clearError();
|
||||
final link = inviteIn(v);
|
||||
if (link != null) {
|
||||
fields.host.text = link.host;
|
||||
fields.port.text = '${link.port}';
|
||||
if (link.secret.isNotEmpty) fields.secret.text = link.secret;
|
||||
return;
|
||||
}
|
||||
final a = addressIn(v);
|
||||
if (a == null || v.trim() == a.host) return;
|
||||
fields.host.text = a.host;
|
||||
|
||||
Reference in new issue
Block a user