Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
bradfitz wants to merge 1 commit into main
base: main
Choose a base branch
Loading
from bradfitz/authkey_intent

Conversation

@bradfitz
Copy link
Member

@bradfitz bradfitz commented Aug 7, 2023

e.g.
adb shell am broadcast -n com.tailscale.ipn/.IPNReceiver -a com.tailscale.ipn.INIT_WITH_AUTHKEY --es authkey "my-super-secret-authkey"

kirancloudworx, svargh, and nyakojiru reacted with hooray emoji
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>
Copy link
Member Author

bradfitz commented Aug 7, 2023

Some corners were cut but it seems to work.

<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" />
Copy link
Member

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.

Copy link
Contributor

@DentonGentry DentonGentry Aug 7, 2023

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?

Copy link
Member Author

@bradfitz bradfitz Aug 7, 2023

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.

Copy link
Member Author

bradfitz commented Aug 8, 2023

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

Copy link

Is this PR gonna be merged anytime soon?

timitoerner reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@raggi raggi raggi left review comments

@DentonGentry DentonGentry Awaiting requested review from DentonGentry

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /