mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Code refactor, support multiple gateways and non-SAML authentication (#9)
* Code refactor * Update README.md
This commit is contained in:
@@ -66,13 +66,10 @@ void GPService::connect(QString server, QString username, QString passwd)
|
||||
args << QCoreApplication::arguments().mid(1)
|
||||
<< "--protocol=gp"
|
||||
<< "-u" << username
|
||||
<< "--passwd-on-stdin"
|
||||
<< "--timestamp"
|
||||
<< "-C" << passwd
|
||||
<< server;
|
||||
|
||||
openconnect->start(bin, args);
|
||||
openconnect->write(passwd.toUtf8());
|
||||
openconnect->closeWriteChannel();
|
||||
}
|
||||
|
||||
void GPService::disconnect()
|
||||
@@ -130,6 +127,5 @@ void GPService::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
|
||||
void GPService::log(QString msg)
|
||||
{
|
||||
qInfo() << msg;
|
||||
emit logAvailable(msg);
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
Description=GlobalProtect openconnect DBus service
|
||||
|
||||
[Service]
|
||||
Environment=LC_ALL=en_US
|
||||
Type=dbus
|
||||
BusName=com.yuezk.qt.GPService
|
||||
ExecStart=/usr/bin/gpservice
|
||||
|
Reference in New Issue
Block a user