mejmo / mac-shrew

Taskbar alternative to ShrewSoft VPN GUI with reconnect feature
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Username & Password Prompt #5

Open bigmadkev opened 7 years ago

bigmadkev commented 7 years ago

When using MacShrew should I get a prompt for the Username & Password when I connect like I do with the Shrew VPN client? Or is there a way to save it down?

Thanks

mejmo commented 7 years ago

What username/password do you mean? There is only one prompt when macshrew is executing iked daemon which requires local admin priviledges. Do you mean these username/password?

bigmadkev commented 7 years ago

I mean the username and password to authenticate with the VPN, maybe that is a requirement of the VPN I have to dial into as the details aren't stored.

mejmo commented 7 years ago

May you please provide the screenshot of this prompt? Which process is asking this?

bigmadkev commented 7 years ago

I mean, when I use the shrews vpn client, I have to enter my vpn username and password to connect. With MacShrew I have no where to enter a username and password for connection. In the log I can see ike waiting for entry in the log.

On Sun, 21 May 2017, 17:01 Martin Formanko, notifications@github.com wrote:

May you please provide the screenshot of this prompt? Which process is asking this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mejmo/mac-shrew/issues/5#issuecomment-302945665, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7v8MiDADPOMpIZojJxcC9XdYgsP-ulks5r8F_qgaJpZM4NhoJ1 .

mejmo commented 7 years ago

Hm, it seems to be another type of IPSec for which MacShrew was originally intended to be. We have two options here: 1) You make the change on your own and create pull request 2) You will provide me with this type of VPN with user/pass

This project was really a "quickie", I do not have a time currently to set up your specific VPN infrastructure... If you make it easier for me, I can add this feature. Thanks

prialgauskaslt commented 6 years ago

Quick and dirty solution

  1. Rename your config file in ~/.ike/sites/ from yourconfigname to yourconfigname_USERNAME_PASSWORD
  2. Check if your VPN is working: /usr/local/bin/ikec -r "<YOUR_NEW_VPN_CONFIG_NAME>" -u <YOUR_USERNAME> -p <YOUR_PASSWORD> -a
  3. Open /Applications/macshrew.app/Contents/Resources/MacShrew.py in your code editor
  4. On line 81 add
        # CUSTOM DIRTY SOLUTION:
        d_filename = str(self.profile_name)
        d_array = d_filename.split('_')
        d_config = ' -u ' + d_array[2] + ' -p ' + d_array[3] + ' -a'
        # END OF CUSTOM DIRTY SOLUTION
  5. Comment-out:
    #self._child = pexpect.spawn('%s -r \"%s\"' % (IKEC_PATH, self.profile_name))

    and add this under it:

    self._child = pexpect.spawn('%s -r \"%s\"%s' % (IKEC_PATH, self.profile_name, d_config))
  6. Save the file
  7. Close and reopen MacShrew if it was open.
  8. Try to connect after selecting your profile
  9. Cheers

NOTE: Your config name cant have more underscores _ than in example do to #quick #and #dirty

@bigmadkev @mejmo