Skip to content
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

Security code support (TOTP) #16

Open
SorianoMarmol opened this issue Apr 18, 2024 · 2 comments
Open

Security code support (TOTP) #16

SorianoMarmol opened this issue Apr 18, 2024 · 2 comments

Comments

@SorianoMarmol
Copy link

SorianoMarmol commented Apr 18, 2024

Hello,

First, I would like to thank you for your work and effort; tunblkctl is really useful.

In my case, the VPN requires an additional security code (TOTP). I would like to know if it is possible to pass it to the client via command, so as not to enter it manually.

Thank you very much!

image

@azhuchkov
Copy link
Owner

azhuchkov commented Apr 18, 2024

Hello!

Thanks for the kind words! Well, the tool doesn't support it right away, and I suppose will not support, since it raises a security concern.

But you still can implement something like that (some AppleScript knowledge may be required). Also you may find Tunnelblick hooks mechanism useful: https://superuser.com/questions/1201961/tunnelblick-mac-scripts

@SorianoMarmol
Copy link
Author

Thank you very much!
Due to work reasons, I've been forced to use a Mac, but I'm still in a Linux mindset.

In this case, I have a function in my zshrc to obtain the TOTP using the OnePassword CLI and then launch tunblkctl, so it's not too dramatic.

function get_vpn_totp() {
    echo "getting pass from op & sleeping 3 seconds"
    TOTP=$(op item get MyVPN --totp)
    echo $TOTP | pbcopy
    echo "TOTP is: $TOTP"
    $(tunblkctl connect --wait client)
    echo "ok"
}

Hence the question, in case the parameter could be added.

I think what I have is sufficient, but I will consider what you've mentioned ;)

You can close the issue if you see fit :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants