From a3a1cf24d6cc546e6030e98c231d5b2539cb1200 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Thu, 20 Feb 2020 20:42:51 +0800 Subject: [PATCH] Add default port --- GPClient/com.yuezk.qt.gpclient.desktop | 2 +- GPClient/main.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/GPClient/com.yuezk.qt.gpclient.desktop b/GPClient/com.yuezk.qt.gpclient.desktop index 0314593..c00753f 100644 --- a/GPClient/com.yuezk.qt.gpclient.desktop +++ b/GPClient/com.yuezk.qt.gpclient.desktop @@ -4,7 +4,7 @@ Type=Application Version=1.0.0 Name=GlobalProtect VPN Comment=GlobalProtect VPN client, supports SAML auth mode -Exec=env QTWEBENGINE_REMOTE_DEBUGGING=12315 /usr/local/bin/gpclient +Exec=/usr/local/bin/gpclient Icon=com.yuezk.qt.GPClient Categories=Network;VPN;Utility;Qt; Keywords=GlobalProtect;Openconnect;SAML;connection;VPN; diff --git a/GPClient/main.cpp b/GPClient/main.cpp index 0d66edf..e397858 100644 --- a/GPClient/main.cpp +++ b/GPClient/main.cpp @@ -3,6 +3,10 @@ int main(int argc, char *argv[]) { + QString port = QString::fromLocal8Bit(qgetenv(ENV_CDP_PORT)); + if (port == "") { + qputenv(ENV_CDP_PORT, "12315"); + } SingleApplication app(argc, argv); GPClient w; w.show();