Exporting and Distributing Connections
Viscosity allows connections to be easily exported and distributed to other users. This is the recommend approach when providing existing Viscosity users with new VPN connections. For information on how to bundle Viscosity with settings and connections, please refer to the Bundling Viscosity with VPN Connections & Preferences (Mac) and Bundling Viscosity with VPN Connections & Preferences (Windows) articles instead.
Viscosity supports two types of connection formats for export, and is also able to import .conf and .ovpn configuration files:
- .visc: These are the standard Viscosity connection file bundles. They contain a config file with all settings for the VPN connection, along with any required certificate and key files. Any custom scripts for the connection are also included. They are a macOS "bundle", which means while they appear to be a single file to macOS users, they will appear as a folder to Windows and Linux users. Because of this, the .visz format below is recommended for distribution.
- .visz: These are an an alternative to the Viscosity connection file bundles, and are essentially a compressed copy of a .visc file (in .tar.gz format). They have the advantage that they will appear as a single file to all users, and can be easily emailed or stored on a web server.
- .ovpn or .conf: These are plain text files using OpenVPN configuration syntax. Viscosity is capable of importing these files, however it does not support them for export (as they do not support Viscosity's additional settings and scripts).
A user can easily import these connection formats by simply double-clicking on them, or using the Import Connection menu in the Preferences window.
Exporting A VPN Connection
Viscosity can automatically create the connection formats for you like so:
- Open Viscosity's Preferences window
- Select the connection you wish to export
- Click on the Utilities drop-down menu (the button next to the left of the Edit button) and select "Export Connection" to create a .visc connection file, or "Export Zipped Connection" to create a .visz connection file.
- Select a location to save the file to and then click the Save button
Creating a Connection File Manually
It is also relatively easy to create Viscosity connection files manually, or write a script to automatically generate them. Viscosity standard connection file bundled (.visc) have the following restrictions:
- Bundle name must be a folder ending in .visc
- The folder must contain an OpenVPN configuration file named "config.conf"
- All certificates, keys, and other files referenced in the configuration file must also be present in the folder. These files should be referenced locally in the config file (i.e. no absolute paths)
- A zipped connection file (.visz) can be created by simply zipping a .visc bundle file, and renaming it to .visz.