Code refactor, support multiple gateways and non-SAML authentication (#9)

* Code refactor

* Update README.md
This commit is contained in:
Kevin Yue
2020-05-23 15:51:10 +08:00
committed by GitHub
parent 76a4977e92
commit 7f5bf0ce52
30 changed files with 1665 additions and 192 deletions

View File

@@ -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);
}

View File

@@ -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