we need start stunnel on linux desktop by ordinary user (like on windows): 1 click stunnel icon on system menu 2 enter user certificate password 3 use opened tunnels with users applications 4 on desktop session ends close all tunnels
make XDG menu entry file: [Desktop Entry] Type=Application Name=stunnel Categories=Network; GenericName=TLS/SSL - Port Wrapper Comment[ru_RU]=Секретный туннель Icon=stunnel Exec=/usr/bin/stunnel Terminal=true X-KeepTerminal=true but only problem is how stunnel react on signals: HUP is daemon's "reload config". in X-session HUP signal is "session end" and stunnel is not exited on closing terminal or logout. attached patch change this behavior: if "foreground=yes" specified in stunnel.conf HUP signal is treated as TERM and stunnel exited. foreground=yes is "debug" or "desktop" mode of stunnel. XDG-desktop file and icon file may be included in default stunnel distributions.
--- stunnel-5.37/src/stunnel.c.orig 2016-10-28 22:10:25.495577433 +0400 +++ stunnel-5.37/src/stunnel.c 2016-10-28 21:51:50.000000000 +0400 @@ -635,6 +635,9 @@ return 0; } ptr=0; + /* treat HUP as TERM if foreground=yes */ + if(global_options.option.foreground&&sig==SIGNAL_RELOAD_CONFIG) + sig=SIGNAL_TERMINATE; switch(sig) { #ifndef USE_WIN32 case SIGCHLD:
_______________________________________________ stunnel-users mailing list -- stunnel-users@stunnel.org To unsubscribe send an email to stunnel-users-le...@stunnel.org