https://github.com/chickenzord/empatpuluh
OpenFortiVPN wrapper with automatic OTP retrieval from IMAP address
https://github.com/chickenzord/empatpuluh
imap openfortivpn otp-verification
Last synced: 3 months ago
JSON representation
OpenFortiVPN wrapper with automatic OTP retrieval from IMAP address
- Host: GitHub
- URL: https://github.com/chickenzord/empatpuluh
- Owner: chickenzord
- License: mit
- Created: 2020-06-29T15:48:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T09:09:20.000Z (almost 5 years ago)
- Last Synced: 2023-03-03T11:42:20.174Z (over 2 years ago)
- Topics: imap, openfortivpn, otp-verification
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# empatpuluh
OpenFortiVPN wrapper with automatic OTP retrieval from IMAP address.
# Why?
Just scratching my own itch.
I use multiple FortiVPN profiles at work which send OTP via corporate email instead of shared key. Automating the copy-paste process can ease the context switching.
Named it empatpuluh (means Forty in Bahasa Indonesia), a number that comes first in mind when thinking about FortiVPN.
# Getting started
Sample config (`$HOME/.empatpuluh.yml`). You can use YAML anchor to reduce repetitive configs.
```yaml
profiles:
- name: production
vpn_config: /home/johndoe/vpn/production.cfg
otp_prompt: "Two-factor authentication token:"
search_delay: 2s
search_sender: [email protected]
search_mailbox: OTP
search_within: 60s
search_field: subject
search_regex: 'AuthCode: (\d+)'
imap:
host: imap.gmail.com
port: 993
username: [email protected]
password: abcdefgghijklmnopqrstuvwxyz
```Then you can connect by running `sudo empatpuluh connect production`.