As the title suggests, whitelisting is broken in GUI. This applies both IP's and <protocols>. For example, if I want to whitelist an IP address (outgoing & incoming), two things happen:</protocols>
WHITE_IP_="42.21.31.4 5.4.23.4 65.54.23.3 53.4.12.4"
So connection[conn_type] is never be printed out there.
Written output for protocols in /etc/pgl/pglcmd.conf is
WHITE_&TCP_="54334 64325 54363 54351"
So in addition to "&" symbol, connection type (IN, OUT, FWD) is never printed out.
I assume /pglgui/src/whitelistmanager.cpp plays a key role here, especially the following and related parts of the code:
QString WhitelistManager::getGroup(QStringList& info)
{
//info should contain the value (a port or an ip address) and the connection type (in, out or fwd)
if ( info.size() != 3 )
return "";
QMap<QString, QString> connection;
connection["Incoming"] = "IN";
connection["Outgoing"] = "OUT";
connection["Forward"] = "FWD";
QString value = info[0];
QString conn_type = info[1];
QString protocol = info[2];
QString key = "WHITE_";
if ( isValidIp(value) )
key += "IP_";
else
key += protocol + "_";
key += connection[conn_type];
return key;
}
Additionally, all "&" symbols are printed in GUI whitelist and visible to user. For example: I&ncoming, Out&going, &TCP...
I couldn't figure out the main cause for these bugs after a quick look. I am using Qt5 version of the GUI (built program from git source).
Qt4 version works (Arch Linux AUR repository) so either Qt5 integration or something else is broken