Giter VIP home page Giter VIP logo

openvpn3-applet's Introduction

openvpn3-applet (for Linux)

This tool exists because NetworkManager does not support OpenVPN 3 yet, see issue #69 in the official OpenVPN repository. We wrote this applet as we want to connect to the OpenVPN CloudConnexa offering which prompts the user to follow an authentication flow in the browser.

This applet currently supports SAML authentication only. PR to support more auth methods welcome. You need to set a default browser, e.g. using the BROWSER env variable.

Update: There is a new official project by OpenVPN: openvpn3-indicator which has better dbus and gnome integration and is hopefully better maintained overall.

Prerequisites:

Install (NixOS)

nix profile install 'git+https://github.com/nesto-software/openvpn3-applet'

You can then add the openvpn3-applet.desktop to your desktop manager's autostart config, e.g. for a working GNOME config using home-manager:

let
  openvpn3-applet-pkg = openvpn3-applet.defaultPackage.${system};
in
 home-manager.users.your-user = { lib, pkgs, ... }: {
    home = {
      file = {
        ".config/autostart/openvpn3-applet.desktop" = {
          source = (openvpn3-applet-pkg + "/share/applications/openvpn3-applet.desktop");
          target = ".config/autostart/openvpn3-applet.desktop";
        };
      };
      packages = [
        openvpn3-applet-pkg
      ];
    };
};

Note: You need to pass the applet's flake as openvpn3-applet and the system.

Install (others)

  • Download the script: git clone https://github.com/nesto-software/openvpn3-applet.git /tmp/openvpn3-applet
  • Install the script: cp -R /tmp/openvpn3-applet/src/. ~/.openvpn3-applet
  • Add to autostart: cp /tmp/openvpn3-applet/xdg-config/autostart/openvpn3-applet.desktop ~/.config/autostart/

Note: Your desktop environment must support XDG Autostart for this to work.

Alternatively, to start the applet manually, launch the script: ~/.openvpn3-applet/openvpn3applet.sh.

To run the script on XWayland, set the environment variable: GDK_BACKEND=x11.

Limitations

We currently support one concurrent connection. Only click "connect" once and wait for the browser to open. Otherwise, the applet attempts to open a second session which is unintended and will be fixed in the future.

Preview

Icon shows connection status

  • red -> disconnected
  • green -> connected
  • blue -> connecting

OpenVPN3-Applet

Popup Menu to manage the connection when clicking on the icon

OpenVPN3-Applet OpenVPN3-Applet

Applet controls the openvpn3 binary which opens the browser for sso

OpenVPN3-Applet

Author

Caro <[email protected]>

License: MIT

Contributors

  • Martin <[email protected]>
  • Feel free to open an issue or PR if you have any proposal...

openvpn3-applet's People

Contributors

martinloeper avatar sinbirb avatar carohemberger avatar jtuz avatar

Stargazers

Corey Pauley avatar Lukas Auer avatar Bastian Hodapp avatar skwahm avatar  avatar JulienDaSilvaUPPA avatar Erki Esken avatar gtarada avatar Ivan Atanasov avatar Björn Arnelid avatar  avatar hansol, park avatar Paweł Piecyk avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar René Bos avatar Steve Grzywinski avatar

openvpn3-applet's Issues

Config File Change not reflected until restart

When I select the openvpn config file and click connect, the applet does not use that file to connect.
I have to restart the applet for it to use the newly selected config file.
This is particularly annoying for initial system configuration, i.e. configuring the applet right after installation.

Tray icon stays red despite connection (seeing older auth failures)

I noticed that the tray icon will function properly for a while, but after some time, it will just stay red, even though I am connected to the VPN.

When I run openvpn3 sessions-list, I see several connections listed similar to the below, as well as my current active connection. I am not 100% sure, but I believe these may be connections that were working and then timed out (my employer's VPN boots us off after 12 hours I believe). If I run the applet from a terminal, over time, more and more "Not connected" messages will appear, in addition to one "Session found". Because there is a connected, valid session, the icon should be green but I guess the older ones are overriding it.

I'm not real sure what a good solution to this. Perhaps a new menu entry that would force disconnecting these failed auth connections? Or doing so automatically, if the config matches what was selected in the applet? Or maybe is it an issue with my actual .ovpn config file, keeping the connection open after auth failure?

    Path: /net/openvpn/v3/sessions/88fd250xxxxxxxad0fee02055f
 Created: Thu Jan 18 16:41:35 2024                  PID: 968619
   Owner: somethingsomething                                 Device: tun0

Config name: /home/user/Documents/VPN/my-vpn-profile.ovpn (Config not available)
Session name: vpn.hostname.ca
Status: Connection, Client authentication failed: Authentication failed

Browser doesn't open to enter user credentials.

Hi,

Thank you for your applet. I'm really happy to find this out.

I do have one issue. When I click connect, browser doesn't open to enter user credentials. Can you please tell me how can I troubleshoot this problem?

I'm on Ubuntu 22.04 with 5.19.0.46-generic kernel, running latest KDE wayland session.

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.