Go to file
Chocobo1 2df33816ed Use high entropy ASLR 2017-01-22 13:20:39 +08:00
res Suppress warning popups if silent_connection is set 2017-01-03 11:28:45 -05:00
.gitignore File 'compile' now removed as well 2016-05-04 16:15:54 +02:00
.kateconfig add .kateconfig 2010-06-29 16:11:34 +02:00
.travis-build-openssl.sh travis-ci: upgraded to openssl-1.0.2i 2016-11-17 00:50:58 +05:00
.travis.yml travis-ci: upgraded to openssl-1.0.2i 2016-11-17 00:50:58 +05:00
BUILD.rst Add instructions on how to build openvpn-gui using openvpn-build 2016-06-30 11:19:38 +03:00
CHANGES.rst Add information about versions 2-7 to CHANGES.rst 2015-11-24 11:50:12 +02:00
COPYING import of openvpn-gui-1.0.3.zip 2008-12-18 11:08:35 +00:00
COPYRIGHT.GPL import of openvpn-gui-1.0.3.zip 2008-12-18 11:08:35 +00:00
Makefile.am removed unused nsis installer 2016-08-27 10:28:16 +05:00
README.rst Documentation improvements 2017-01-13 09:24:22 +02:00
TODO enforce entry of a username when querying auth 2012-07-20 12:53:14 +02:00
access.c Ensure group name in shell-execute cmdline is clean 2016-04-03 21:03:33 -04:00
access.h Handle interactive service policy restrictions 2016-03-13 20:23:20 -04:00
bootstrap use automake in build 2012-03-28 10:59:44 +00:00
chartable.h convert files to unix style end-of-line 2012-03-28 10:44:54 +00:00
configure.ac Use high entropy ASLR 2017-01-22 13:20:39 +08:00
localization.c Load icons at sizes given by DPI-dependent system metric 2016-12-08 16:01:58 -05:00
localization.h Load icons at sizes given by DPI-dependent system metric 2016-12-08 16:01:58 -05:00
main.c Enable ASLR. Closes #119. 2017-01-22 13:19:34 +08:00
main.h Make the program DPI aware 2016-11-19 21:57:39 -05:00
manage.c Support pkcs11 token insertion request and pin input 2016-11-15 19:29:23 -05:00
manage.h Read errors from the service pipe and handle fatal ones 2016-05-08 18:07:31 -04:00
misc.c Handle dynamic challenge/response 2016-11-15 19:14:32 -05:00
misc.h Handle dynamic challenge/response 2016-11-15 19:14:32 -05:00
openvpn-gui-res.h Support pkcs11 token insertion request and pin input 2016-11-15 19:29:23 -05:00
openvpn.c Mark status as connected only if openvpn reports CONNECTED,SUCCESS 2017-01-02 14:23:01 -05:00
openvpn.h Support pkcs11 token insertion request and pin input 2016-11-15 19:29:23 -05:00
openvpn_config.c Suppress warning popups if silent_connection is set 2017-01-03 11:28:45 -05:00
openvpn_config.h refactor option handling code 2010-04-09 06:18:58 +02:00
options.c Make options saved in registry editable by user 2016-08-06 11:46:15 -04:00
options.h Merge pull request #91 from selvanair/pkcs11-pin-v3 2016-11-30 22:18:34 +02:00
passphrase.c Simplify some parameters and registry keys 2016-08-06 11:46:15 -04:00
passphrase.h Simplify some parameters and registry keys 2016-08-06 11:46:15 -04:00
proxy.c Make options saved in registry editable by user 2016-08-06 11:46:15 -04:00
proxy.h support SOCKS 5 proxy auth notifications from mgmt 2012-07-20 11:55:10 +02:00
registry.c Make options saved in registry editable by user 2016-08-06 11:46:15 -04:00
registry.h Make options saved in registry editable by user 2016-08-06 11:46:15 -04:00
save_pass.c Save username and optionally passwords 2016-05-29 19:35:30 -04:00
save_pass.h Save username and optionally passwords 2016-05-29 19:35:30 -04:00
scripts.c Make options saved in registry editable by user 2016-08-06 11:46:15 -04:00
scripts.h use managment interface 2010-09-10 11:39:39 +02:00
service.c Handle interactive service policy restrictions 2016-03-13 20:23:20 -04:00
service.h Handle interactive service policy restrictions 2016-03-13 20:23:20 -04:00
tray.c Load icons at sizes given by DPI-dependent system metric 2016-12-08 16:01:58 -05:00
tray.h Save username and optionally passwords 2016-05-29 19:35:30 -04:00
viewlog.c Use file associations to open config and log 2016-08-06 11:46:15 -04:00
viewlog.h convert files to unix style end-of-line 2012-03-28 10:44:54 +00:00

README.rst

Installation Instructions for OpenVPN GUI for Windows
#####################################################

OpenVPN-GUI has been bundled with OpenVPN installers for a long time, so there
is rarely a need to install it separately. Bleeding-edge
versions of OpenVPN-GUI are available in `OpenVPN snapshot
installers <http://build.openvpn.net/downloads/snapshots/>`_ based on Git master
branch. OpenVPN-GUI gets installed by default in all OpenVPN installers.

Installation using the official OpenVPN installers
**************************************************

* Download an `OpenVPN installer <https://openvpn.net/index.php/open-source.html>`_
* If you have a previous version of OpenVPN GUI running, shut it down.
  Make sure it's closed by ALL logged on users.

* Run the OpenVPN installer

Manual installation of OpenVPN GUI
**********************************

* `Download <https://openvpn.net/index.php/download/community-downloads.html>`_
  and install OpenVPN

* Download OpenVPN GUI of your choice and save it in OpenVPN's bin folder.
  Default is *C:\\Program Files\\OpenVPN\\bin\\*. You must put it in this folder
  because OpenVPN GUI depends on the OpenSSL DLLs installed in this folder by
  OpenVPN.

Configuring OpenVPN GUI to start on Windows logon
*************************************************

OpenVPN GUI can be configured to start automatically on logon to Windows from
its setting menu. This is default behavior for all users if OpenVPN GUI was
installed by an OpenVPN 2.4 installer using default installer options.

Adding an OpenVPN configuration file
************************************

To launch a VPN connections using OpenVPN GUI you need to add an OpenVPN
configuration file with .ovpn suffix. Any text editor (e.g. notepad.exe) can be
used to create a OpenVPN configuration files. Note that *log* and *log-append*
options are ignored as OpenVPN GUI redirects the normal output to a log file
itself. There are sample config files in the *sample-config* folder. Please
refer to the `OpenVPN project homepage <https://openvpn.net>`_ for more
information regarding creating the configuration file.

Once the configuration file is ready, you need to let OpenVPN GUI know about it.
There are three ways to do this:

* Place the file into the system-wide location, usually
  *C:\\Program Files\\OpenVPN\\config\\*, or any of its immediate
  subdirectories. This VPN connection will be visible for all users of the
  system.
* Place the file into *C:\\Users\\username\\OpenVPN\\config\\*, or any of its
  immediated subdirectories. The configuration file is only visible for the
  user in question. If the user is not a member of the built-in "Administrators"
  group or "OpenVPN Administrators" group and tries to launch such a connection,
  OpenVPN GUI pops up a UAC, offering to create the latter group (if missing)
  and to add the user to it. This will only work if admin-level credentials are
  available.
* Use the "Import file" function in OpenVPN GUI itself

Using OpenVPN GUI
#################

When OpenVPN GUI is started your OpenVPN config folders
(*C:\\Users\\username\\OpenVPN\\config* and
*C:\\Program Files\\OpenVPN\\config*) will be scanned for .ovpn files and the
OpenVPN GUI icon will appear in the system tray. Each OpenVPN configuration 
file shows up as a separate menu item in the OpenVPN GUI tray, allowing you to
selectively connect to and disconnect to your VPNs. The config dir will be
re-scanned for new config files every time you open the OpenVPN GUI menu by
right-clicking the icon.

When you choose to connect to a site OpenVPN GUI will launch openvpn with
the specified config file. If you use a passphrase protected key you will be
prompted for the passphrase.

If you want OpenVPN GUI to start a connection automatically when it's started,
you can use the --connect cmd-line option. You have to include the extention
for the config file. Example::

    openvpn-gui --connect office.ovpn

To get help with OpenVPN GUI please use one of the official `OpenVPN support
channels <https://community.openvpn.net/openvpn/wiki/GettingHelp>`_.

Running OpenVPN GUI as a Non-Admin user
***************************************

OpenVPN 2.3.x and earlier bundle an OpenVPN GUI version (< 11) which has to be
run as admin for two reasons

* OpenVPN GUI registry keys are stored in system-wide location
  under HKEY_LOCAL_MACHINE, and they are generated when OpenVPN GUI was
  launched the first time
* OpenVPN itself requires admin-level privileges to modify network settings

OpenVPN GUI 11 and later can make full use of the Interactive Service
functionality in recent versions of OpenVPN. This changes a number of
things:

* OpenVPN GUI can store its settings in user-specific part of the registry under
  HKEY_CURRENT_USER
* OpenVPN is able to delegate certain privileged operations, such as adding
  routes, to the Interactive service, removing the need to run OpenVPN with
  admin privileges. Note that for this to work the *OpenVPNServiceInteractive*
  system service has to be enabled and running.

Run Connect/Disconnect/Preconnect Scripts
*****************************************

There are three different scripts that OpenVPN GUI can execute to help
with different tasks like mapping network drives.

Preconnect  If a file named "xxx_pre.bat" exist in the config folder
            where xxx is the same as your OpenVPN config file name,
            this will be executed BEFORE the OpenVPN tunnel is established.

Connect     If a file named "xxx_up.bat" exist in the config folder
            where xxx is the same as your OpenVPN config file name,
            this will be executed AFTER the OpenVPN tunnel is established.

Disconnect  If a file named "xxx_down.bat" exist in the config folder
            where xxx is the same as your OpenVPN config file name,
            this will be executed BEFORE the OpenVPN tunnel is closed.


Registry Values affecting the OpenVPN GUI operation
***************************************************

Parameters taken from the global registry values in
*HKEY_LOCAL_MACHINE\\SOFTWARE\\OpenVPN\\* key

config_dir
    The global configuration file directory. Defaults to
    *C:\\Program Files\\OpenVPN\\config*

exe_path
    path to openvpn.exe, defaults to *C:\\Program Files\\OpenVPN\\bin\\openvpn.exe*

priority
    the windows priority class for each instantiated OpenVPN process,
    can be one of:

    * IDLE_PRIORITY_CLASS
    * BELOW_NORMAL_PRIORITY_CLASS
    * NORMAL_PRIORITY_CLASS (default)
    * ABOVE_NORMAL_PRIORITY_CLASS
    * HIGH_PRIORITY_CLASS

ovpn_admin_group
    The windows group whose membership allows the user to start any configuration file
    in their profile (not just those installed by the administrator in the global
    config directory). Default: "OpenVPN Administrators".

All other OpenVPN GUI registry values are located below the
*HKEY_CURRENT_USER\\SOFTWARE\\OpenVPN-GUI\\* key

The following keys are used to control the OpenVPN GUI

config_dir
    The user-specific configuration file directory: defaults to
    *C:\\Users\\username\\OpenVPN\\config*.
    The GUI parses this directory for configuration files before
    parsing the global config_dir.

config_ext
    file extension on configuration files, defaults to *ovpn*

connectscript_timeout
    Time in seconds to wait for the connect script to finish. If set to 0
    the exitcode of the script is not checked.

disconnectscript_timeout
    Time in seconds to wait for the disconnect script to finish. Must be a
    value between 1-99.

preconnectscript_timeout
    Time in seconds to wait for the preconnect script to finish. Must be a
    value between 1-99.

log_dir
    log file directory, defaults to *C:\\Users\\username\\OpenVPN\\log*

log_append
    if set to "0", the log file will be truncated every time you start a
    connection. If set to "1", the log will be appended to the log file.
  
silent_connection
    If set to "1", the status window with the OpenVPN log output will
    not be shown while connecting. Warnings such as interactive service
    not started or multiple config files with same name are also suppressed.

service_only
    If set to "1", OpenVPN GUI's normal "Connect" and "Disconnect"
    actions are changed so they start/stop the OpenVPN service instead
    of launching openvpn.exe directly.

show_balloon
    0: Never show any connected balloon

    1: Show balloon after initial connection is established

    2: Show balloon even after re-connects

All of these registry options are also available as cmd-line options.
Use "openvpn-gui --help" for more info about cmd-line options.

Building OpenVPN GUI from source
################################

See `BUILD.rst <BUILD.rst>`_ for build instructions.