-
Notifications
You must be signed in to change notification settings - Fork 548
android: add INIT_WITH_AUTHKEY intent #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e.g. adb shell am broadcast -n com.tailscale.ipn/.IPNReceiver -a com.tailscale.ipn.INIT_WITH_AUTHKEY --es authkey "my-super-secret-authkey" Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Some corners were cut but it seems to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading this correctly, any app can send a disconnect broadcast, then this and cause the device to join a particular tailnet. We need to make sure this intent is not callable or receivable by other applications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be len(b.backend.ListProfiles()) == 0 ? If any authenticated profiles exist, whether actively logged in or not, then we wouldn't accept an authkey?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I didn't finish this part.
Including video here too. Not shown, the ADB commands...
adb install -r tailscale-debug.apk
adb shell am start -n com.tailscale.ipn/com.tailscale.ipn.IPNActivity
adb shell am broadcast -n com.tailscale.ipn/.IPNReceiver -a com.tailscale.ipn.INIT_WITH_AUTHKEY --es authkey "tskey-auth-......"
Screen.Recording.2023年08月07日.at.1.39.03.PM.mov
FarahMoniem
commented
Nov 28, 2024
Is this PR gonna be merged anytime soon?
e.g.
adb shell am broadcast -n com.tailscale.ipn/.IPNReceiver -a com.tailscale.ipn.INIT_WITH_AUTHKEY --es authkey "my-super-secret-authkey"