Import Multiple configs at once?

Got a problem with Viscosity or need help? Ask here!

dontbugme

Posts: 5
Joined: Sun Jul 17, 2016 4:26 pm

Post by dontbugme » Fri Dec 18, 2020 5:53 am
I have a folder structure with many ovpn configs that I'd like to import all at once instead of 1 by 1; is this possible?

I'd like for the connections tab to also maintain that folder structure as well.

i.e. I have a structure like this that I'd like imported and replicated right in Viscosity:
Code: Select all
+-- Asia
¦   +-- China
¦   ¦   +-- Hong Kong
¦   ¦       +-- Hong Kong 01.ovpn
¦   ¦       +-- Hong Kong 02.ovpn
¦   ¦       +-- Hong Kong 03.ovpn
¦   ¦       +-- Hong Kong 04.ovpn
¦   +-- India
¦   ¦   +-- Mumbai
¦   ¦       +-- Mumbai 01.ovpn
¦   ¦       +-- Mumbai 02.ovpn
¦   +-- Japan
¦   ¦   +-- Tokyo
¦   ¦       +-- Tokyo 01.ovpn
¦   ¦       +-- Tokyo 02.ovpn
¦   ¦       +-- Tokyo 03.ovpn
¦   ¦       +-- Tokyo 04.ovpn
¦   +-- Singapore
¦   ¦   +-- Singapore
¦   ¦       +-- Singapore 01.ovpn
¦   ¦       +-- Singapore 02.ovpn
¦   ¦       +-- Singapore 03.ovpn
¦   ¦       +-- Singapore 04.ovpn
¦   +-- South Korea
¦       +-- Seoul
¦           +-- Seoul 01.ovpn
¦           +-- Seoul 02.ovpn
+-- Australia
¦   +-- Sydney
¦       +-- Sydney 01.ovpn
¦       +-- Sydney 02.ovpn
¦       +-- Sydney 03.ovpn
¦       +-- Sydney 04.ovpn
+-- Europe
¦   +-- Austria
¦   ¦   +-- Vienna
¦   ¦       +-- Vienna 01.ovpn
¦   ¦       +-- Vienna 02.ovpn
¦   ¦       +-- Vienna 03.ovpn
¦   ¦       +-- Vienna 04.ovpn
¦   +-- Belgium
¦   ¦   +-- Brussels
¦   ¦       +-- Brussels 01.ovpn
¦   ¦       +-- Brussels 02.ovpn
¦   ¦       +-- Brussels 03.ovpn
¦   ¦       +-- Brussels 04.ovpn
¦   +-- Bulgaria
¦   ¦   +-- Sofia
¦   ¦       +-- Sofia 01.ovpn
¦   ¦       +-- Sofia 02.ovpn
¦   +-- Czech Republic
¦   ¦   +-- Prague
¦   ¦       +-- Prague 01.ovpn
¦   ¦       +-- Prague 02.ovpn
¦   +-- Denmark
¦   ¦   +-- Copenhagen
¦   ¦       +-- Copenhagen 01.ovpn
¦   ¦       +-- Copenhagen 02.ovpn
¦   ¦       +-- Copenhagen 03.ovpn
¦   ¦       +-- Copenhagen 04.ovpn
¦   +-- England
¦   ¦   +-- London
¦   ¦   ¦   +-- London 01.ovpn
¦   ¦   ¦   +-- London 02.ovpn
¦   ¦   ¦   +-- London 03.ovpn
¦   ¦   ¦   +-- London 04.ovpn
¦   ¦   +-- Manchester
¦   ¦       +-- Manchester 01.ovpn
¦   ¦       +-- Manchester 02.ovpn
¦   ¦       +-- Manchester 03.ovpn
¦   ¦       +-- Manchester 04.ovpn
¦   +-- FInland
¦   ¦   +-- Helsinki
¦   ¦       +-- Helsinki 01.ovpn
¦   ¦       +-- Helsinki 02.ovpn
¦   +-- France
¦   ¦   +-- Paris
¦   ¦       +-- Paris 01.ovpn
¦   ¦       +-- Paris 02.ovpn
¦   ¦       +-- Paris 03.ovpn
¦   ¦       +-- Paris 04.ovpn
¦   +-- Germany
¦   ¦   +-- Frankfurt
¦   ¦       +-- Frankfurt 01.ovpn
¦   ¦       +-- Frankfurt 02.ovpn
¦   ¦       +-- Frankfurt 03.ovpn
¦   ¦       +-- Frankfurt 04.ovpn
¦   ¦       +-- Frankfurt 05.ovpn
¦   ¦       +-- Frankfurt 06.ovpn
¦   ¦       +-- Frankfurt 07.ovpn
¦   ¦       +-- Frankfurt 08.ovpn
¦   +-- Hungary
¦   ¦   +-- Budapest
¦   ¦       +-- Budapest 01.ovpn
¦   ¦       +-- Budapest 02.ovpn
¦   +-- Iceland
¦   ¦   +-- Reykjavik
¦   ¦       +-- Reykjavik 01.ovpn
¦   ¦       +-- Reykjavik 02.ovpn
¦   +-- Ireland
¦   ¦   +-- Dublin
¦   ¦       +-- Dublin 01.ovpn
¦   ¦       +-- Dublin 02.ovpn
¦   ¦       +-- Dublin 03.ovpn
¦   ¦       +-- Dublin 04.ovpn
¦   +-- Italy
¦   ¦   +-- Milan
¦   ¦       +-- Milan 01.ovpn
¦   ¦       +-- Milan 02.ovpn
¦   +-- Netherlands
¦   ¦   +-- Amsterdam
¦   ¦       +-- Amsterdam 01.ovpn
¦   ¦       +-- Amsterdam 02.ovpn
¦   ¦       +-- Amsterdam 03.ovpn
¦   ¦       +-- Amsterdam 04.ovpn
¦   ¦       +-- Amsterdam 05.ovpn
¦   ¦       +-- Amsterdam 06.ovpn
¦   ¦       +-- Amsterdam 07.ovpn
¦   ¦       +-- Amsterdam 08.ovpn
¦   ¦       +-- Amsterdam 09.ovpn
¦   ¦       +-- Amsterdam 10.ovpn
¦   ¦       +-- Amsterdam 11.ovpn
¦   ¦       +-- Amsterdam 12.ovpn
¦   ¦       +-- Amsterdam 13.ovpn
¦   ¦       +-- Amsterdam 14.ovpn
¦   ¦       +-- Amsterdam 15.ovpn
¦   ¦       +-- Amsterdam 16.ovpn
¦   +-- New Zealand
¦   ¦   +-- Auckland
¦   ¦       +-- Auckland 01.ovpn
¦   ¦       +-- Auckland 02.ovpn
¦   ¦       +-- Auckland 03.ovpn
¦   +-- Norway
¦   ¦   +-- Oslo
¦   ¦       +-- Oslo 01.ovpn
¦   ¦       +-- Oslo 02.ovpn
¦   ¦       +-- Oslo 03.ovpn
¦   +-- Poland
¦   ¦   +-- Warsaw
¦   ¦       +-- Warsaw 01.ovpn
¦   ¦       +-- Warsaw 02.ovpn
¦   ¦       +-- Warsaw 03.ovpn
¦   ¦       +-- Warsaw 04.ovpn
¦   +-- Portugal
¦   ¦   +-- Lisbon
¦   ¦       +-- Lisbon 01.ovpn
¦   ¦       +-- Lisbon 02.ovpn
¦   +-- Serbia
¦   ¦   +-- Belgrade
¦   ¦       +-- Belgrade 01.ovpn
¦   ¦       +-- Belgrade 02.ovpn
¦   +-- Spain
¦   ¦   +-- Madrid
¦   ¦       +-- Madrid 01.ovpn
¦   +-- Sweden
¦   ¦   +-- Stockholm
¦   ¦       +-- Stockholm 01.ovpn
¦   ¦       +-- Stockholm 02.ovpn
¦   ¦       +-- Stockholm 03.ovpn
¦   ¦       +-- Stockholm 04.ovpn
¦   +-- Switzerland
¦   ¦   +-- Zurich
¦   ¦       +-- Zurich 01.ovpn
¦   ¦       +-- Zurich 02.ovpn
¦   ¦       +-- Zurich 03.ovpn
¦   ¦       +-- Zurich 04.ovpn
¦   +-- Turkey
¦   ¦   +-- Istanbul
¦   ¦       +-- Istanbul 01.ovpn
¦   ¦       +-- Istanbul 02.ovpn
¦   +-- Ukraine
¦       +-- Kiev
¦           +-- Kiev 01.ovpn
¦           +-- Kiev 02.ovpn
+-- North America
¦   +-- Canada
¦   ¦   +-- British Columbia
¦   ¦   ¦   +-- Vancouver
¦   ¦   ¦       +-- Vancouver 01.ovpn
¦   ¦   ¦       +-- Vancouver 02.ovpn
¦   ¦   +-- Ontario
¦   ¦   ¦   +-- Toronto
¦   ¦   ¦       +-- Toronto 03.ovpn
¦   ¦   +-- Quebec
¦   ¦       +-- Montreal
¦   ¦           +-- Montreal 01.ovpn
¦   ¦           +-- Montreal 02.ovpn
¦   ¦           +-- Montreal 03.ovpn
¦   ¦           +-- Montreal 04.ovpn
¦   +-- Mexico
¦   ¦   +-- Mexico City
¦   ¦       +-- Mexico City 01.ovpn
¦   ¦       +-- Mexico City 02.ovpn
¦   +-- USA
¦       +-- Arizona
¦       ¦   +-- Phoenix
¦       ¦       +-- Phoenix 01.ovpn
¦       ¦       +-- Phoenix 02.ovpn
¦       ¦       +-- Phoenix 03.ovpn
¦       ¦       +-- Phoenix 04.ovpn
¦       ¦       +-- Phoenix 05.ovpn
¦       ¦       +-- Phoenix 06.ovpn
¦       ¦       +-- Phoenix 07.ovpn
¦       ¦       +-- Phoenix 08.ovpn
¦       +-- California
¦       ¦   +-- Los Angeles
¦       ¦       +-- Los Angeles 09.ovpn
¦       ¦       +-- Los Angeles 10.ovpn
¦       ¦       +-- Los Angeles 12.ovpn
¦       +-- Florida
¦       ¦   +-- Miami
¦       ¦       +-- Miami 01.ovpn
¦       ¦       +-- Miami 02.ovpn
¦       ¦       +-- Miami 03.ovpn
¦       ¦       +-- Miami 04.ovpn
¦       +-- New York
¦       ¦   +-- New York City
¦       ¦       +-- New York City 01.ovpn
¦       ¦       +-- New York City 02.ovpn
¦       ¦       +-- New York City 03.ovpn
¦       ¦       +-- New York City 04.ovpn
¦       +-- Texas
¦       ¦   +-- Dallas
¦       ¦       +-- Dallas 01.ovpn
¦       ¦       +-- Dallas 02.ovpn
¦       +-- Virginia
¦       ¦   +-- Ashburn
¦       ¦       +-- Ashburn 01.ovpn
¦       ¦       +-- Ashburn 02.ovpn
¦       ¦       +-- Ashburn 03.ovpn
¦       ¦       +-- Ashburn 04.ovpn
¦       ¦       +-- Ashburn 05.ovpn
¦       ¦       +-- Ashburn 06.ovpn
¦       ¦       +-- Ashburn 07.ovpn
¦       ¦       +-- Ashburn 08.ovpn
¦       ¦       +-- Ashburn 09.ovpn
¦       ¦       +-- Ashburn 10.ovpn
¦       ¦       +-- Ashburn 11.ovpn
¦       ¦       +-- Ashburn 12.ovpn
¦       ¦       +-- Ashburn 13.ovpn
¦       ¦       +-- Ashburn 14.ovpn
¦       ¦       +-- Ashburn 15.ovpn
¦       ¦       +-- Ashburn 16.ovpn
¦       +-- Washington
¦           +-- Seattle
¦               +-- Seattle 01.ovpn
¦               +-- Seattle 02.ovpn
+-- South Africa
¦   +-- Johannesburg
¦       +-- Johannesburg 01.ovpn
¦       +-- Johannesburg 02.ovpn
+-- South America
    +-- Argentina
    ¦   +-- Buenos Aires
    ¦       +-- Buenos Aires 01.ovpn
    ¦       +-- Buenos Aires 02.ovpn
    +-- Brazil
        +-- Sao Paulo
            +-- Sao Paulo 01.ovpn
            +-- Sao Paulo 02.ovpn

95 directories, 165 files

Eric

User avatar
Posts: 1073
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Fri Dec 18, 2020 10:28 am
Hi dontbugme,

You can import a folder and it's subfolders at once by changing the file type when you import to "This Folder" in the bottom left of the browse dialog after selecting Import Connection -> From File... I'm afraid this won't maintain your folder structure though.

To maintain your folder structure, the best thing to do is use a Preconfigure bundle. Instead of needing to create an installer for this, you can setup the preconfigure, copy it to %appdata%\Viscosity, and then restart Viscosity. We have some information on creating one here, it should be as simple as dropping your existing folder structure into the Connections folder and copying it across - https://sparklabs.com/support/kb/articl ... s-windows/

Regards,
Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

dontbugme

Posts: 5
Joined: Sun Jul 17, 2016 4:26 pm

Post by dontbugme » Fri Dec 25, 2020 6:21 pm
Hi Eric,

Thank you! That worked great. I just copied all connections into the Preconfigured folder and move it there and they now all show up properly. One last question; all of these vpn's are from the same provider, and use the same exact login and pw; is there some way for me to preconfigure them to automatically use the same login and pw? I wasn't really understanding the instructions regarding that on the page you linked for me.

Eric

User avatar
Posts: 1073
Joined: Sun Jan 03, 2010 3:27 am

Post by Eric » Mon Jan 04, 2021 9:05 am
Hi dontbugme,

I'm afraid there isn't a way to preconfigure this. You can edit each folder though and tick "Share saved credentials for connections in this folder". This means after one connection has been connected and a username/password saved, that username/password will be used for all other connections in that folder for subsequent connection attempts.

Regards,
Eric
Eric Thorpe
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
4 posts Page 1 of 1