SparkLabs Forum.

Community Help.

Folder of configs + username/password

1) I have a folder of ovpn configs I want to import them en masse into Viscosity. I know I can do this using the Viscosity UI. Is there a way to do this via the commandline?

From this response (posting.php?mode=quote&f=9&p=7519) it seems I can import a single config file, but I couldn't get it to work for a folder. (Separately, importing a single config via the commandline shows an annoying popup, so running the commandline in batch isn't straightforward.)

2) When importing a folder of connections, is it possible to import them directly into a folder in the Viscosity UI? It seems one has to import configs from a folder, then select + drag/drop them into a Viscosity UI folder.

3) Is there a way to specify username/password when importing a folder of configs?

4) The response linked above also says "Viscosity will also try and import an auth up file into it's credential storage if one is present when importing the connection".

a) I assume this applies to importing 1 single config; is there a version for folder-of-configs-import?

b) Related, just how is the up file to be specified? The openvpn client commandline would be "openvpn.exe --config [path-to-config] --auth-user-pass [path-to-up-file]". This seems not to work with Viscosity.exe

c) I tried editing the ovpn file to replace "auth-user-pass" with "auth-user-pass up.txt", also ".\up.txt", "./up.txt", "C:\...\up.txt" -- they all just caused a connection error (openvpn.exe complained re incorrect format). It would be great if I could get this to work, as I could edit ovpn files in a script

d) I tried adding "auth-user-pass up.txt" to a specific connection as here ( ... -user-pass); that required I "allow unsafe commands" ... and still failed to connect. This method of specifying user-pass is moot in my case anyway, since I'm looking to avoid futzing with each connection once imported.

My ongoing approach has been: create folder in Viscosity UI + set to share creds; import configs from folder; drag-drop imported configs into folder; manually connect using one of the configs, the thought being that other connections will share it. This is still all too manual. Pls could you suggest something better?
Hi tek,

As I have previous mentioned we can't cover all possible scenarios in Viscosity, what you are doing is certainly not a regular use of Viscosity so we can't prioritise these features. There is currently no way to import a folder of connections from command line, however please take a look at the bundling process as this may help with your requirements - ... s-windows/

In regards to 3 & 4, what you are doing in 4.d should be working. If it is not please post an example config and we can take a look.

Thx, Eric. The bundling you've referred to would help if I need to install Viscosity + configs on multiple computers. My use case is that approx every 2 weeks I get updated lists of servers, and need to purge/load 1 viscosity client.

That said, back to bundling, I'm curious -- the article you referred to says "We highly recommend you use connections that have been exported from Viscosity..." Does this preserve user/passwords per connection/folder as well? I assume not, but I didn't see the article say either way.
Hi tek,

No, credentials are not preserved as it's a security risk allowing them to be easily exported.

To update you, we found a bug in importing credentials from the auth-user-pass file, this has been corrected in the latest beta - ... -versions/

Eric, thx for the heads up re not retaining creds. I have connections to some vpn servers, in a shared-creds Viscosity folder, error as "user/pass incorrect", w/ current user/pass filled in in error dialog, and when I simply click OK it then connects. Which makes me think some vpn servers have a different/bad user/pass associated with 'em. I've tried Viscosity's reset-creds button in the UI, but the issue still crops up. Perhaps it's an issue w/ the vpn provider.

Re importing creds, as I understand it an up file is specified only as in 4.d in OP, per connection and in the UI, which is still too laborious for my needs.

Related I came across 4.c as a thing w/ at least 1 ovpn client; haven't researched whether it's an ovpn spec; will try again w/ this beta.

5 posts Page 1 of 1

Copyright © 2016 SparkLabs Pty Ltd. All Rights Reserved. Privacy Policy