Build package/module for closed-source binary package Pulse Secure VPN

hello

Can you explain me how to configure and lauch this ?

thank you

Sorry. Missed this.

You just change the protocol to nc.

    subprocess.run(["sudo", "openconnect", "-C", dsid["value"], "--protocol=nc", "-u", user, host])

I am not sure what you mean by launch. But, I have this script as an overlay which is then installed as an executable in my path. You could simply launch it as python3 openconnect.py

It would be nice if we could have a working ivanti package in nixpkgs, just like it says in Pulse Secure Connect VPN client (aka Ivanti Secure Access Client) · Issue #193434 · NixOS/nixpkgs · GitHub

Did anybody get to a working solution that could be considered for inclusion there?

1 Like

I wrote pulse-cookie (my first public open-source package) and I’m glad someone’s using it! :smiley:

If only we didn’t have to…

Hi @erahhal, I have been using your code with much pleasure in NixOS 25.05.
Thank you for that!

Unfortunately it breaks in 25.11, with;

 error: pulse-cookie-1.0 does not configure a `format`. To build with setuptools as before, set `pyproject = true` and `build-system = [ setuptools ]`.

Tried some things based in the error suggestion, but I’m just guessing.

Do you know how to get it to work again?

Kind regards, Justin

this worked for me:

let
pulse-cookie = pkgs.python3.pkgs.buildPythonApplication rec {
pname = “pulse-cookie”;
version = “1.0”;
pyproject = true;

src = pkgs.fetchPypi {
  inherit pname version;
  sha256 = "sha256-ZURSXfChq2k8ktKO6nc6AuVaAMS3eOcFkiKahpq4ebU=";
};

build-system = [
  pkgs.python3.pkgs.setuptools
  pkgs.python3.pkgs.setuptools-scm
];

propagatedBuildInputs = [
  pkgs.python3.pkgs.pyqt6
  pkgs.python3.pkgs.pyqt6-webengine
];

preBuild = ''
  cat > setup.py << EOF
  from setuptools import setup

  setup(
    name='pulse-cookie',
    packages=['pulse_cookie'],
    package_dir={"": 'src'},
    version='1.0',
    author='Raj Magesh Gauthaman',
    description='wrapper around openconnect allowing user to log in through a webkit window for mfa',
    install_requires=[
      'PyQt6-WebEngine',
    ],
    entry_points={
      'console_scripts': ['get-pulse-cookie=pulse_cookie._cli:main']
    },
  )
  EOF
'';

doCheck = false;

meta = with pkgs.lib; {
  homepage = "https://pypi.org/project/pulse-cookie/";
  description = "wrapper around openconnect allowing user to log in through a webkit window for mfa";
  license = licenses.gpl3;
};
};

start-pulse-vpn = pkgs.writeShellScriptBin “start-pulse-vpn” ‘’
HOST=https://ps.vpn.ucsb.edu/ra

echo "Grabbing SAML cookie via PyQt6..."
DSID=$(${pulse-cookie}/bin/get-pulse-cookie -n DSID $HOST)

echo "Cookie acquired! Starting openconnect..."
sudo ${pkgs.openconnect}/bin/openconnect --protocol nc -C DSID=$DSID $HOST
in

@eliahreeves thank you for your reply. .

Ik switched over to use GitHub - erahhal/openconnect-pulse-launcher · GitHub in the meantime.