-
Notifications
You must be signed in to change notification settings - Fork 479
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
android: add INIT_WITH_AUTHKEY intent #122
base: main
Are you sure you want to change the base?
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 <[email protected]>
Some corners were cut but it seems to work. |
@@ -60,6 +60,7 @@ | |||
<intent-filter> | |||
<action android:name="com.tailscale.ipn.CONNECT_VPN" /> | |||
<action android:name="com.tailscale.ipn.DISCONNECT_VPN" /> | |||
<action android:name="com.tailscale.ipn.INIT_WITH_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.
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...
Screen.Recording.2023-08-07.at.1.39.03.PM.mov |
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"