+
+void RemotePeer::setProxyLine(ProxyLine proxyLine)
+{
+ _proxyLine = std::move(proxyLine);
+
+ if (socket()) {
+ if (_proxyLine.protocol != QAbstractSocket::UnknownNetworkLayerProtocol) {
+ QList<QString> subnets = Quassel::optionValue("proxy-cidr").split(",");
+ for (const QString& subnet : subnets) {
+ if (socket()->peerAddress().isInSubnet(QHostAddress::parseSubnet(subnet))) {
+ _useProxyLine = true;
+ return;
+ }
+ }
+ }
+ }
+ _useProxyLine = false;
+}