mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Support custom parameters (#76)
* Add the setting icon * Add support for custom parameters * Ignore auto generated files * Update README.md
This commit is contained in:
@@ -49,7 +49,7 @@ void GPService::quit()
|
||||
}
|
||||
}
|
||||
|
||||
void GPService::connect(QString server, QString username, QString passwd)
|
||||
void GPService::connect(QString server, QString username, QString passwd, QString extraArgs)
|
||||
{
|
||||
if (vpnStatus != GPService::VpnNotConnected) {
|
||||
log("VPN status is: " + QVariant::fromValue(vpnStatus).toString());
|
||||
@@ -65,10 +65,13 @@ void GPService::connect(QString server, QString username, QString passwd)
|
||||
QStringList args;
|
||||
args << QCoreApplication::arguments().mid(1)
|
||||
<< "--protocol=gp"
|
||||
<< QProcess::splitCommand(extraArgs)
|
||||
<< "-u" << username
|
||||
<< "-C" << passwd
|
||||
<< server;
|
||||
|
||||
log("Start process with arugments: " + args.join(" "));
|
||||
|
||||
openconnect->start(bin, args);
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,7 @@ signals:
|
||||
void logAvailable(QString log);
|
||||
|
||||
public slots:
|
||||
void connect(QString server, QString username, QString passwd);
|
||||
void connect(QString server, QString username, QString passwd, QString extraArgs);
|
||||
void disconnect();
|
||||
int status();
|
||||
void quit();
|
||||
|
@@ -12,6 +12,7 @@
|
||||
<arg name="server" type="s" direction="in"/>
|
||||
<arg name="username" type="s" direction="in"/>
|
||||
<arg name="passwd" type="s" direction="in"/>
|
||||
<arg name="extraArgs" type="s" direction="in"/>
|
||||
</method>
|
||||
<method name="disconnect">
|
||||
</method>
|
||||
|
Reference in New Issue
Block a user