mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-09-29 15:18:34 -04:00
Merge branch 'master' into jsonapi
This commit is contained in:
commit
396fe49312
84 changed files with 3163 additions and 1501 deletions
|
@ -67,17 +67,17 @@ public:
|
|||
enum Status
|
||||
{
|
||||
Error = -1,
|
||||
NotConnected,
|
||||
Connecting,
|
||||
Authenticating,
|
||||
Connected
|
||||
NotConnected = 0x00,
|
||||
Connecting = 0x01,
|
||||
Authenticating = 0x02,
|
||||
Connected = 0x03
|
||||
};
|
||||
|
||||
enum TorStatus
|
||||
{
|
||||
TorUnknown,
|
||||
TorOffline,
|
||||
TorReady
|
||||
TorUnknown = 0x00,
|
||||
TorOffline = 0x01,
|
||||
TorReady = 0x02
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -118,12 +118,17 @@ TorProcess *TorManager::process()
|
|||
return d->process;
|
||||
}
|
||||
|
||||
QString TorManager::dataDirectory() const
|
||||
bool TorManager::isTorAvailable()
|
||||
{
|
||||
return !instance()->d->torExecutablePath().isNull();
|
||||
}
|
||||
|
||||
QString TorManager::torDataDirectory() const
|
||||
{
|
||||
return d->dataDir;
|
||||
}
|
||||
|
||||
void TorManager::setDataDirectory(const QString &path)
|
||||
void TorManager::setTorDataDirectory(const QString &path)
|
||||
{
|
||||
d->dataDir = QDir::fromNativeSeparators(path);
|
||||
|
||||
|
|
|
@ -58,18 +58,18 @@ class TorManager : public QObject
|
|||
Q_PROPERTY(Tor::TorControl* control READ control CONSTANT)
|
||||
Q_PROPERTY(bool hasError READ hasError NOTIFY errorChanged)
|
||||
Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorChanged)
|
||||
Q_PROPERTY(QString dataDirectory READ dataDirectory WRITE setDataDirectory)
|
||||
Q_PROPERTY(QString torDataDirectory READ torDataDirectory WRITE setTorDataDirectory)
|
||||
|
||||
public:
|
||||
|
||||
explicit TorManager(QObject *parent = 0);
|
||||
static bool isTorAvailable() ;
|
||||
static TorManager *instance();
|
||||
|
||||
TorProcess *process();
|
||||
TorControl *control();
|
||||
|
||||
QString dataDirectory() const;
|
||||
void setDataDirectory(const QString &path);
|
||||
|
||||
QString torDataDirectory() const;
|
||||
void setTorDataDirectory(const QString &path);
|
||||
|
||||
QString hiddenServiceDirectory() const;
|
||||
void setHiddenServiceDirectory(const QString &path);
|
||||
|
@ -100,6 +100,7 @@ signals:
|
|||
void errorChanged();
|
||||
|
||||
private:
|
||||
explicit TorManager(QObject *parent = 0);
|
||||
TorManagerPrivate *d;
|
||||
};
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include <rshare.h>
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
#include "TorControl/TorManager.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
@ -136,7 +137,7 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
|||
//ui.headerFrame->setHeaderText(tr("Create a new profile"));
|
||||
|
||||
connect(ui.reuse_existing_node_CB, SIGNAL(triggered()), this, SLOT(switchReuseExistingNode()));
|
||||
connect(ui.adv_checkbox, SIGNAL(triggered()), this, SLOT(setupState()));
|
||||
connect(ui.adv_checkbox, SIGNAL(toggled(bool)), this, SLOT(setupState()));
|
||||
connect(ui.nodeType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(setupState()));
|
||||
|
||||
connect(ui.genButton, SIGNAL(clicked()), this, SLOT(genPerson()));
|
||||
|
@ -181,10 +182,10 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
|||
* mark last one as default.
|
||||
*/
|
||||
|
||||
QMenu *menu = new QMenu(tr("Advanced options"));
|
||||
menu->addAction(ui.adv_checkbox);
|
||||
menu->addAction(ui.reuse_existing_node_CB);
|
||||
ui.optionsButton->setMenu(menu);
|
||||
//QMenu *menu = new QMenu(tr("Advanced options"));
|
||||
//menu->addAction(ui.adv_checkbox);
|
||||
//menu->addAction(ui.reuse_existing_node_CB);
|
||||
// ui.optionsButton->setMenu(menu);
|
||||
|
||||
mAllFieldsOk = false ;
|
||||
mEntropyOk = false ;
|
||||
|
@ -195,10 +196,10 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
|||
ui.nodeType_CB->setCurrentIndex(1);
|
||||
ui.nodeType_CB->setEnabled(false);
|
||||
#endif
|
||||
#ifdef RETROTOR
|
||||
ui.adv_checkbox->setChecked(false);
|
||||
ui.adv_checkbox->setVisible(true);
|
||||
#endif
|
||||
//#ifdef RETROTOR
|
||||
// ui.adv_checkbox->setChecked(false);
|
||||
// ui.adv_checkbox->setVisible(true);
|
||||
//#endif
|
||||
|
||||
initKeyList();
|
||||
setupState();
|
||||
|
@ -259,30 +260,39 @@ void GenCertDialog::setupState()
|
|||
{
|
||||
bool adv_state = ui.adv_checkbox->isChecked();
|
||||
|
||||
#ifdef RETROTOR
|
||||
bool retrotor = true ;
|
||||
#else
|
||||
bool retrotor = false ;
|
||||
#endif
|
||||
|
||||
if(!adv_state)
|
||||
{
|
||||
ui.reuse_existing_node_CB->setChecked(false) ;
|
||||
ui.nodeType_CB->setCurrentIndex(retrotor?1:0) ;
|
||||
ui.keylength_comboBox->setCurrentIndex(0) ;
|
||||
// ui.nodeType_CB->setCurrentIndex(0);
|
||||
}
|
||||
bool hidden_state = ui.nodeType_CB->currentIndex()==1;
|
||||
ui.reuse_existing_node_CB->setVisible(adv_state) ;
|
||||
|
||||
// ui.nodeType_CB->setVisible(adv_state) ;
|
||||
// ui.nodeType_LB->setVisible(adv_state) ;
|
||||
// ui.nodeTypeExplanation_TE->setVisible(adv_state) ;
|
||||
|
||||
bool hidden_state = ui.nodeType_CB->currentIndex()==1 || ui.nodeType_CB->currentIndex()==2;
|
||||
bool generate_new = !ui.reuse_existing_node_CB->isChecked();
|
||||
bool tor_auto = ui.nodeType_CB->currentIndex()==1;
|
||||
|
||||
genNewGPGKey = generate_new;
|
||||
|
||||
switch(ui.nodeType_CB->currentIndex())
|
||||
{
|
||||
case 0: ui.nodeTypeExplanation_TE->setText(tr("<b>Your IP is visible to trusted nodes only. You can also connect to hidden nodes if running Tor on your machine. Best choice for sharing with trusted friends.</b>"));
|
||||
break;
|
||||
case 1: ui.nodeTypeExplanation_TE->setText(tr("<b>Your IP is hidden. All traffic happens over the Tor network. Best choice if you cannot trust friend nodes with your own IP.</b>"));
|
||||
break;
|
||||
case 2: ui.nodeTypeExplanation_TE->setText(tr("<b>Hidden node for advanced users only. Allows to use other proxy solutions such as I2P.</b>"));
|
||||
break;
|
||||
}
|
||||
|
||||
//ui.no_node_label->setVisible(false);
|
||||
|
||||
setWindowTitle(generate_new?tr("Create new profile and new Retroshare node"):tr("Create new Retroshare node"));
|
||||
//ui.headerFrame->setHeaderText(generate_new?tr("Create a new profile and node"):tr("Create a new node"));
|
||||
|
||||
ui.label_nodeType->setVisible(adv_state && !retrotor) ;
|
||||
ui.nodeType_CB->setVisible(adv_state && !retrotor) ;
|
||||
ui.reuse_existing_node_CB->setEnabled(adv_state) ;
|
||||
ui.importIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||
ui.exportIdentity_PB->setVisible(adv_state && !generate_new) ;
|
||||
|
@ -318,13 +328,13 @@ void GenCertDialog::setupState()
|
|||
ui.entropy_bar->setVisible(true);
|
||||
ui.genButton->setVisible(true);
|
||||
|
||||
ui.hiddenaddr_input->setVisible(hidden_state && !retrotor);
|
||||
ui.hiddenaddr_label->setVisible(hidden_state && !retrotor);
|
||||
ui.hiddenaddr_input->setVisible(hidden_state && !tor_auto);
|
||||
ui.hiddenaddr_label->setVisible(hidden_state && !tor_auto);
|
||||
|
||||
ui.hiddenport_label->setVisible(hidden_state && !retrotor);
|
||||
ui.hiddenport_spinBox->setVisible(hidden_state && !retrotor);
|
||||
ui.hiddenport_label->setVisible(hidden_state && !tor_auto);
|
||||
ui.hiddenport_spinBox->setVisible(hidden_state && !tor_auto);
|
||||
|
||||
ui.cbUseBob->setVisible(hidden_state && !retrotor);
|
||||
ui.cbUseBob->setVisible(hidden_state && !tor_auto);
|
||||
|
||||
if(!mAllFieldsOk)
|
||||
{
|
||||
|
@ -470,7 +480,6 @@ void GenCertDialog::genPerson()
|
|||
/* Check the data from the GUI. */
|
||||
std::string genLoc = ui.node_input->text().toUtf8().constData();
|
||||
RsPgpId PGPId;
|
||||
bool isHiddenLoc = false;
|
||||
|
||||
if(ui.nickname_input->isVisible())
|
||||
{
|
||||
|
@ -503,18 +512,26 @@ void GenCertDialog::genPerson()
|
|||
}
|
||||
}
|
||||
|
||||
if (ui.nodeType_CB->currentIndex()==1)
|
||||
bool isHiddenLoc = (ui.nodeType_CB->currentIndex()>0);
|
||||
bool isAutoTor = (ui.nodeType_CB->currentIndex()==1);
|
||||
|
||||
if(isAutoTor && !Tor::TorManager::isTorAvailable())
|
||||
{
|
||||
QMessageBox::critical(this,tr("Tor is not available"),tr("No Tor executable has been found on your system. You need to install Tor before creating a hidden identity.")) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
if(isHiddenLoc)
|
||||
{
|
||||
std::string hl = ui.hiddenaddr_input->text().toStdString();
|
||||
uint16_t port = ui.hiddenport_spinBox->value();
|
||||
|
||||
bool useBob = ui.cbUseBob->isChecked();
|
||||
|
||||
if (useBob && hl.empty())
|
||||
hl = "127.0.0.1";
|
||||
|
||||
RsInit::SetHiddenLocation(hl, port, useBob); /* parses it */
|
||||
|
||||
isHiddenLoc = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -620,7 +637,7 @@ void GenCertDialog::genPerson()
|
|||
std::string err;
|
||||
this->hide();//To show dialog asking password PGP Key.
|
||||
std::cout << "RsAccounts::GenerateSSLCertificate" << std::endl;
|
||||
bool okGen = RsAccounts::GenerateSSLCertificate(PGPId, "", genLoc, "", isHiddenLoc, sslPasswd, sslId, err);
|
||||
bool okGen = RsAccounts::createNewAccount(PGPId, "", genLoc, "", isHiddenLoc, isAutoTor, sslPasswd, sslId, err);
|
||||
|
||||
if (okGen)
|
||||
{
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>569</width>
|
||||
<height>426</height>
|
||||
<width>978</width>
|
||||
<height>826</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -50,10 +50,7 @@
|
|||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="profileframeVLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="RSLabel">
|
||||
<property name="text">
|
||||
|
@ -71,7 +68,45 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="toolBarHLayout">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="nodeType_LB">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Node type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="nodeType_CB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Standard node</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Hidden node (over Tor)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Hidden node (Tor/I2P - Manually configured)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="toolBarHSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -86,13 +121,9 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="optionsButton">
|
||||
<widget class="QCheckBox" name="adv_checkbox">
|
||||
<property name="text">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="icons.qrc">
|
||||
<normaloff>:/icons/svg/options.svg</normaloff>:/icons/svg/options.svg</iconset>
|
||||
<string>advanced options</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -100,16 +131,23 @@
|
|||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="nodeTypeExplanation_TE">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="profile_groupBox">
|
||||
<property name="styleSheet">
|
||||
|
@ -233,26 +271,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="2">
|
||||
<widget class="QComboBox" name="nodeType_CB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Standard node</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>TOR/I2P Hidden node</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="node_input">
|
||||
<property name="sizePolicy">
|
||||
|
@ -357,6 +375,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="reuse_existing_node_CB">
|
||||
<property name="text">
|
||||
<string>Use existing profile...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
|
@ -675,28 +700,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<widget class="QLabel" name="label_nodeType">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="icons.qrc">:/icons/svg/netgraph.svg</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
|
@ -729,22 +732,6 @@
|
|||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="adv_checkbox">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Advanced options</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="reuse_existing_node_CB">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use existing profile</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>name_input</tabstop>
|
||||
|
|
|
@ -84,12 +84,13 @@
|
|||
#include "statusbar/ToasterDisable.h"
|
||||
#include "statusbar/SysTrayStatus.h"
|
||||
#include "statusbar/torstatus.h"
|
||||
#include <retroshare/rsstatus.h>
|
||||
|
||||
#include <retroshare/rsiface.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rsnotify.h>
|
||||
#include "retroshare/rsstatus.h"
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "retroshare/rsnotify.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
|
||||
#include "gui/gxschannels/GxsChannelDialog.h"
|
||||
#include "gui/gxsforums/GxsForumsDialog.h"
|
||||
|
@ -250,14 +251,15 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
|
|||
|
||||
if(hiddenmode)
|
||||
{
|
||||
#ifdef RETROTOR
|
||||
torstatus = new TorStatus();
|
||||
torstatus->setVisible(Settings->valueFromGroup("StatusBar", "ShowTor", QVariant(true)).toBool());
|
||||
statusBar()->addWidget(torstatus);
|
||||
torstatus->getTorStatus();
|
||||
#else
|
||||
torstatus = NULL ;
|
||||
#endif
|
||||
if(RsAccounts::isHiddenNode())
|
||||
{
|
||||
torstatus = new TorStatus();
|
||||
torstatus->setVisible(Settings->valueFromGroup("StatusBar", "ShowTor", QVariant(true)).toBool());
|
||||
statusBar()->addWidget(torstatus);
|
||||
torstatus->getTorStatus();
|
||||
}
|
||||
else
|
||||
torstatus = NULL ;
|
||||
|
||||
natstatus = NULL ;
|
||||
dhtstatus = NULL ;
|
||||
|
|
|
@ -76,7 +76,7 @@ SoundManager::SoundManager() : QObject()
|
|||
|
||||
void SoundManager::soundEvents(SoundEvents &events)
|
||||
{
|
||||
QDir baseDir = QDir(QString::fromUtf8(RsAccounts::DataDirectory().c_str()) + "/sounds");
|
||||
QDir baseDir = QDir(QString::fromUtf8(RsAccounts::systemDataDirectory().c_str()) + "/sounds");
|
||||
|
||||
events.mDefaultPath = baseDir.absolutePath();
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ static QStringList getBaseDirList()
|
|||
// Search chat styles in config dir and data dir (is application dir for portable)
|
||||
QStringList baseDirs;
|
||||
baseDirs.append(QString::fromUtf8(RsAccounts::ConfigDirectory().c_str()));
|
||||
baseDirs.append(QString::fromUtf8(RsAccounts::DataDirectory().c_str()));
|
||||
baseDirs.append(QString::fromUtf8(RsAccounts::systemDataDirectory().c_str()));
|
||||
|
||||
return baseDirs;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,9 @@ ChatWidget::ChatWidget(QWidget *parent)
|
|||
fontmenu->addAction(ui->actionResetFont);
|
||||
fontmenu->addAction(ui->actionNoEmbed);
|
||||
fontmenu->addAction(ui->actionSendAsPlainText);
|
||||
#ifdef USE_CMARK
|
||||
fontmenu->addAction(ui->actionSend_as_CommonMark);
|
||||
#endif
|
||||
|
||||
QMenu *menu = new QMenu();
|
||||
menu->addAction(ui->actionClearChatHistory);
|
||||
|
@ -205,9 +207,11 @@ ChatWidget::ChatWidget(QWidget *parent)
|
|||
ui->chatTextEdit->setOnlyPlainText(ui->actionSendAsPlainText->isChecked());
|
||||
connect(ui->actionSendAsPlainText, SIGNAL(toggled(bool)), ui->chatTextEdit, SLOT(setOnlyPlainText(bool)) );
|
||||
|
||||
#ifdef USE_CMARK
|
||||
connect(ui->actionSend_as_CommonMark, SIGNAL(toggled(bool)), this, SLOT(setUseCMark(bool)) );
|
||||
ui->cmPreview->setVisible(false);
|
||||
connect(ui->chatTextEdit, SIGNAL(textChanged()), this, SLOT(updateCMPreview()) );
|
||||
#endif
|
||||
ui->cmPreview->setVisible(false);
|
||||
|
||||
ui->textBrowser->resetImagesStatus(Settings->getChatLoadEmbeddedImages());
|
||||
ui->textBrowser->installEventFilter(this);
|
||||
|
@ -983,10 +987,12 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const RsGxsId gx
|
|||
formatTextFlag |= RSHTML_FORMATTEXT_EMBED_SMILEYS;
|
||||
}
|
||||
|
||||
#ifdef USE_CMARK
|
||||
//Use CommonMark
|
||||
if (message.contains("CMark=\"true\"")) {
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_USE_CMARK;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Always fix colors
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_FIX_COLORS;
|
||||
|
|
|
@ -107,7 +107,7 @@ QVariant RSTextBrowser::loadResource(int type, const QUrl &name)
|
|||
if(fi.exists() && fi.isFile()) {
|
||||
QString cpath = fi.canonicalFilePath();
|
||||
if (cpath.startsWith(QDir(QString::fromUtf8(RsAccounts::ConfigDirectory().c_str())).canonicalPath(),Qt::CaseInsensitive)
|
||||
|| cpath.startsWith(QDir(QString::fromUtf8(RsAccounts::DataDirectory().c_str())).canonicalPath(),Qt::CaseInsensitive))
|
||||
|| cpath.startsWith(QDir(QString::fromUtf8(RsAccounts::systemDataDirectory().c_str())).canonicalPath(),Qt::CaseInsensitive))
|
||||
return QTextBrowser::loadResource(type, name);
|
||||
}}
|
||||
|
||||
|
@ -251,53 +251,22 @@ bool RSTextBrowser::checkImage(QPoint pos, QString &imageStr)
|
|||
*/
|
||||
QString RSTextBrowser::anchorForPosition(const QPoint &pos) const
|
||||
{
|
||||
// Many calls when time label shows up
|
||||
QTextCursor cursor = cursorForPosition(pos);
|
||||
cursor.select(QTextCursor::WordUnderCursor);
|
||||
QString word = cursor.selectedText();
|
||||
QString anchor = "";
|
||||
if (word.isEmpty())
|
||||
return anchor;
|
||||
|
||||
// For finding positions
|
||||
QTextCursor cursor_line = cursorForPosition(pos);
|
||||
cursor_line.select(QTextCursor::LineUnderCursor);
|
||||
QString line = cursor_line.selectedText();
|
||||
// End of nickname (more or less, of course, because some can has colon in
|
||||
// name)
|
||||
int end_of_name = line.indexOf(": ") + 1;
|
||||
// Start of nickname (after time)
|
||||
int space_index = line.indexOf(' ') + 1;
|
||||
int word_index = line.indexOf(word) + 1;
|
||||
int once = 1;
|
||||
cursor_line.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor, once);
|
||||
bool after_name = cursor_line.position() + end_of_name < cursor.position();
|
||||
bool cursor_after_time = space_index < word_index;
|
||||
bool cursor_within_name = word_index <= end_of_name;
|
||||
if (!after_name && cursor_after_time && cursor_within_name) {
|
||||
cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::MoveAnchor, once);
|
||||
cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::MoveAnchor,
|
||||
space_index);
|
||||
cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor,
|
||||
end_of_name - space_index);
|
||||
if (cursor.selectedText().isEmpty()) {
|
||||
return anchor;
|
||||
if (!cursor.selectedText().isEmpty()){
|
||||
QRegExp rx("<a name=\"(.*)\"",Qt::CaseSensitive, QRegExp::RegExp2);
|
||||
rx.setMinimal(true);
|
||||
QString sel = cursor.selection().toHtml();
|
||||
QStringList anchors;
|
||||
int pos=0;
|
||||
while ((pos = rx.indexIn(sel,pos)) != -1) {
|
||||
anchors << rx.cap(1);
|
||||
pos += rx.matchedLength();
|
||||
}
|
||||
if (!anchors.isEmpty()){
|
||||
anchor = anchors.at(0);
|
||||
}
|
||||
} else {
|
||||
return anchor;
|
||||
}
|
||||
|
||||
QRegExp rx("<a name=\"(.*)\"",Qt::CaseSensitive, QRegExp::RegExp2);
|
||||
rx.setMinimal(true);
|
||||
QString sel = cursor.selection().toHtml();
|
||||
QStringList anchors;
|
||||
int position = 0;
|
||||
while ((position = rx.indexIn(sel, position)) != -1) {
|
||||
anchors << rx.cap(1);
|
||||
position += rx.matchedLength();
|
||||
}
|
||||
if (!anchors.isEmpty()) {
|
||||
anchor = anchors.at(0);
|
||||
}
|
||||
return anchor;
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QTextCodec>
|
||||
#include <QDesktopServices>
|
||||
|
||||
#include "gui/notifyqt.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
|
@ -756,18 +757,19 @@ void MessageWidget::anchorClicked(const QUrl &url)
|
|||
{
|
||||
RetroShareLink link(url);
|
||||
|
||||
if (link.valid() == false) {
|
||||
return;
|
||||
if(link.valid())
|
||||
{
|
||||
if (link.type() == RetroShareLink::TYPE_CERTIFICATE && currMsgFlags & RS_MSG_USER_REQUEST) {
|
||||
std::cerr << "(WW) Calling some disabled code in MessageWidget::anchorClicked(). Please contact the developpers." << std::endl;
|
||||
// link.setSubType(RSLINK_SUBTYPE_CERTIFICATE_USER_REQUEST);
|
||||
}
|
||||
|
||||
QList<RetroShareLink> links;
|
||||
links.append(link);
|
||||
RetroShareLink::process(links);
|
||||
}
|
||||
|
||||
if (link.type() == RetroShareLink::TYPE_CERTIFICATE && currMsgFlags & RS_MSG_USER_REQUEST) {
|
||||
std::cerr << "(WW) Calling some disabled code in MessageWidget::anchorClicked(). Please contact the developpers." << std::endl;
|
||||
// link.setSubType(RSLINK_SUBTYPE_CERTIFICATE_USER_REQUEST);
|
||||
}
|
||||
|
||||
QList<RetroShareLink> links;
|
||||
links.append(link);
|
||||
RetroShareLink::process(links);
|
||||
else
|
||||
QDesktopServices::openUrl(url) ;
|
||||
}
|
||||
|
||||
void MessageWidget::loadImagesAlways()
|
||||
|
|
|
@ -29,11 +29,12 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include <retroshare/rsbanlist.h>
|
||||
#include <retroshare/rsconfig.h>
|
||||
#include <retroshare/rsdht.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsturtle.h>
|
||||
#include "retroshare/rsbanlist.h"
|
||||
#include "retroshare/rsconfig.h"
|
||||
#include "retroshare/rsdht.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsturtle.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QMovie>
|
||||
|
@ -62,23 +63,14 @@
|
|||
///
|
||||
|
||||
// Tabs numbers *after* non relevant tabs are removed. So do not use them to add/remove tabs!!
|
||||
#ifdef RETROTOR
|
||||
static const uint32_t TAB_HIDDEN_SERVICE_OUTGOING = 0;
|
||||
static const uint32_t TAB_HIDDEN_SERVICE_INCOMING = 1;
|
||||
|
||||
static const uint32_t TAB_NETWORK = 0;
|
||||
static const uint32_t TAB_HIDDEN_SERVICE = 1;
|
||||
static const uint32_t TAB_IP_FILTERS = 99; // This is a trick: these tabs do not exist, so enabling/disabling them has no effect
|
||||
static const uint32_t TAB_RELAYS = 99;
|
||||
#else
|
||||
const static uint32_t TAB_HIDDEN_SERVICE_OUTGOING = 0;
|
||||
const static uint32_t TAB_HIDDEN_SERVICE_INCOMING = 2;
|
||||
const static uint32_t TAB_HIDDEN_SERVICE_INCOMING = 1;
|
||||
const static uint32_t TAB_HIDDEN_SERVICE_I2P_BOB = 2;
|
||||
|
||||
const static uint32_t TAB_NETWORK = 0;
|
||||
const static uint32_t TAB_IP_FILTERS = 1;
|
||||
const static uint32_t TAB_HIDDEN_SERVICE = 2;
|
||||
const static uint32_t TAB_HIDDEN_SERVICE = 1;
|
||||
const static uint32_t TAB_IP_FILTERS = 2;
|
||||
const static uint32_t TAB_RELAYS = 3;
|
||||
#endif
|
||||
|
||||
//#define SERVER_DEBUG 1
|
||||
|
||||
|
@ -90,13 +82,15 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
|
||||
manager = NULL ;
|
||||
|
||||
#ifdef RETROTOR
|
||||
if(RsAccounts::isTorAuto())
|
||||
{
|
||||
// Here we use absolute numbers instead of consts defined above, because the consts correspond to the tab number *after* this tab removal.
|
||||
|
||||
ui.tabWidget->removeTab(3) ; // remove relays. Not useful in Tor mode.
|
||||
ui.tabWidget->removeTab(1) ; // remove IP filters. Not useful in Tor mode.
|
||||
ui.tabWidget->removeTab(TAB_RELAYS) ; // remove relays. Not useful in Tor mode.
|
||||
ui.tabWidget->removeTab(TAB_IP_FILTERS) ; // remove IP filters. Not useful in Tor mode.
|
||||
|
||||
ui.hiddenServiceTab->removeTab(TAB_HIDDEN_SERVICE_I2P_BOB) ; // remove the Automatic I2P/BOB tab
|
||||
|
||||
ui.hiddenServiceTab->removeTab(1) ; // remove the Automatic I2P/BOB tab
|
||||
ui.hiddenpage_proxyAddress_i2p->hide() ;
|
||||
ui.hiddenpage_proxyLabel_i2p->hide() ;
|
||||
ui.hiddenpage_proxyPort_i2p->hide() ;
|
||||
|
@ -109,7 +103,8 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
|
||||
ui.hiddenpage_outHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
|
||||
ui.hiddenpage_inHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_RANGE,new QTableWidgetItem(tr("IP Range"))) ;
|
||||
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_STATUS,new QTableWidgetItem(tr("Status"))) ;
|
||||
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_ORIGIN,new QTableWidgetItem(tr("Origin"))) ;
|
||||
|
@ -137,7 +132,6 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
for(std::list<std::string>::const_iterator it(ip_servers.begin());it!=ip_servers.end();++it)
|
||||
ui.IPServersLV->addItem(QString::fromStdString(*it)) ;
|
||||
|
||||
ui.hiddenServiceTab->setTabEnabled(TAB_HIDDEN_SERVICE_INCOMING, false);
|
||||
ui.gbBob->setEnabled(false);
|
||||
ui.swBobAdvanced->setCurrentIndex(0);
|
||||
|
||||
|
@ -340,8 +334,8 @@ void ServerPage::load()
|
|||
if (mIsHiddenNode)
|
||||
{
|
||||
mHiddenType = detail.hiddenType;
|
||||
ui.tabWidget->setTabEnabled(TAB_IP_FILTERS,false) ; // ip filter
|
||||
ui.tabWidget->setTabEnabled(TAB_RELAYS,false) ; // relay
|
||||
//ui.tabWidget->setTabEnabled(TAB_IP_FILTERS,false) ; // ip filter
|
||||
//ui.tabWidget->setTabEnabled(TAB_RELAYS,false) ; // relay
|
||||
loadHiddenNode();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabNetConf">
|
||||
<attribute name="title">
|
||||
|
@ -525,277 +525,6 @@ behind a firewall or a VPN.</string>
|
|||
<zorder>IPServersLV</zorder>
|
||||
<zorder>ipAddressList</zorder>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabIPFilters">
|
||||
<attribute name="title">
|
||||
<string>IP Filters</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="tabIPFiltersVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="denyAll_CB">
|
||||
<property name="text">
|
||||
<string>Activate IP filtering</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="ipTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="ipBlackListTabWidget">
|
||||
<attribute name="title">
|
||||
<string>IP blacklist</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="ipBlackListTabWidgetVLayout">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="filteredIpsTable">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This list gets automatically filled with information gathered at multiple sources: masquerading peers reported by the DHT, IP ranges entered by you, and IP ranges reported by your friends. Default settings should protect you against large scale traffic relaying.</p><p>Automatically guessing masquerading IPs can put your friends IPs in the blacklist. In this case, use the context menu to whitelist them.</p></body></html></string>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>IP range</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Origin</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Reason</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="includeFromFriends_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is very drastic, be careful. Since masquerading IPs might be actual real IPs, this option might cause disconnection, and will probably force you to add your friends' IPs into the whitelist.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ban every IP reported by your friends</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="includeFromDHT_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Another drastic option. If you use it, be prepared to add your friends' IPs into the whitelist when needed.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ban every masquerading IP reported by your DHT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="groupIPRangesHLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="groupIPRanges_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>If used alone, this option protects you quite well from large scale IP masquerading.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Automatically ban ranges of DHT masquerading IPs starting at</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="groupIPRanges_SB">
|
||||
<property name="suffix">
|
||||
<string> IPs</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="groupIPRangesHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="ipWhiteListTabWidget">
|
||||
<attribute name="title">
|
||||
<string>IP whitelist</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="ipWhiteListTabWidgetGLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTableWidget" name="whiteListIpsTable">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>White listed IPs are gathered from the following sources: IPs coming inside a manually exchanged certificate, IP ranges entered by you in this window, or in the security feed items.</p><p>The default behavior for Retroshare is to (1) always allow connection to peers with IP in the whitelist, even if that IP is also blacklisted; (2) optionally require IPs to be in the whitelist. You can change this behavior for each peer in the &quot;Details&quot; window of each Retroshare node. </p></body></html></string>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>IP range</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Origin</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Reason</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="manualInputGBox">
|
||||
<property name="title">
|
||||
<string>Manual input</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="manualInputGBoxVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="ipinputHLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="ipInput_LE">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enter an IP range. Accepted formats:</p><p>193.190.209.15</p><p>193.190.209.15/24</p><p>193.190.209.15/16</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="ipInputRange_SB">
|
||||
<property name="minimum">
|
||||
<number>16</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>32</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="ipInputComment_LE">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enter any comment you'd like</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ipInputAddBlackList_PB">
|
||||
<property name="text">
|
||||
<string>Add to blacklist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ipInputAddWhiteList_PB">
|
||||
<property name="text">
|
||||
<string>Add to whitelist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="manualInputVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabHiddenConf">
|
||||
<attribute name="title">
|
||||
<string>Hidden Service Configuration</string>
|
||||
|
@ -810,7 +539,7 @@ behind a firewall or a VPN.</string>
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="hiddenServiceTabManual">
|
||||
<attribute name="title">
|
||||
|
@ -981,6 +710,204 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="hiddenServiceTabIncoming">
|
||||
<attribute name="title">
|
||||
<string>Incoming</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="hiddenServiceTabIncomingVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="hiddenpage_inHeader">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Setup your hidden address (and port if needed)</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="incomingAddressGLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="hiddenpage_localPort">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<layout class="QHBoxLayout" name="testIncomingHLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="testIncoming_PB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This button simulates a SSL connection to your hidden address using the corresponding proxy. If your hidden node is reachable, it should cause a SSL handshake error, which RS will interpret as a valid connection state. This operation might also cause several &quot;security warning&quot; about connections from your local host IP (127.0.0.1) in the News Feed if you enabled it, which you should interpret as a sign of good communication.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="hiddenpage_servicePort">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="l_serviceAddress">
|
||||
<property name="text">
|
||||
<string>Service Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="l_localAddress">
|
||||
<property name="text">
|
||||
<string>Local Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="hiddenpage_serviceAddress">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is your hidden address. It should look like <span style=" font-weight:600;">[something].onion</span> or <span style=" font-weight:600;">[something].b32.i2p. </span>If you configured a hidden service with Tor, the onion address is generated automatically by Tor. You can get it in e.g. <span style=" font-weight:600;">/var/lib/tor/[service name]/hostname</span>. For I2P: Setup a server tunnel ( http://127.0.0.1:7657/i2ptunnelmgr ) and copy it's base32 address when it is started (should end with .b32.i2p)</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="hiddenpage_localAddress">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is the local address to which the hidden service points at your localhost. Most of the time, <span style=" font-weight:600;">127.0.0.1</span> is the right answer.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<layout class="QHBoxLayout" name="serviceIncomingHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="iconlabel_service_incoming">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="l_incomingTestResult">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This led turns green only if you launch an active test using the above button. </p><p>When it does, it means that your hidden node can be reached from anywhere, using the Tor (resp. I2P) </p><p>network. Congratulations!</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>incoming ok</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="hiddenpage_configurationVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="l_hiddenpage_configuration">
|
||||
<property name="text">
|
||||
<string>Expected Configuration:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="hiddenpage_configuration">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>Please fill in a service address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="hiddenpageInHelpPlainTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>To Receive Connections, you must first setup a Tor/I2P Hidden Service.
|
||||
|
||||
For Tor: See torrc and documentation for HOWTO details.
|
||||
|
||||
For I2P: See http://127.0.0.1:7657/i2ptunnelmgr for setting up a server tunnel:
|
||||
Tunnel Wizard -> Server Tunnel -> Standard -> enter a name -> enter the address and port your RS is using (see Local Address above) -> check 'Auto Start' -> finish!
|
||||
|
||||
Once this is done, paste the Onion/I2P (Base32) Address in the box above.
|
||||
This is your external address on the Tor/I2P network.
|
||||
Finally make sure that the Ports match the configuration.
|
||||
|
||||
If you have issues connecting over Tor check the Tor logs too.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="vspacerHiddenIn">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="hiddenServiceTabI2PBOB">
|
||||
<attribute name="title">
|
||||
<string>Automatic I2P/BOB</string>
|
||||
|
@ -1456,204 +1383,277 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="hiddenServiceTabIncoming">
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabIPFilters">
|
||||
<attribute name="title">
|
||||
<string>IP Filters</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="tabIPFiltersVLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="denyAll_CB">
|
||||
<property name="text">
|
||||
<string>Activate IP filtering</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="ipTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="ipBlackListTabWidget">
|
||||
<attribute name="title">
|
||||
<string>Incoming</string>
|
||||
<string>IP blacklist</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="hiddenServiceTabIncomingVLayout">
|
||||
<layout class="QVBoxLayout" name="ipBlackListTabWidgetVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="hiddenpage_inHeader">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Setup your hidden address (and port if needed)</p></body></html></string>
|
||||
<widget class="QTableWidget" name="filteredIpsTable">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="incomingAddressGLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="hiddenpage_localPort">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<layout class="QHBoxLayout" name="testIncomingHLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="testIncoming_PB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This button simulates a SSL connection to your hidden address using the corresponding proxy. If your hidden node is reachable, it should cause a SSL handshake error, which RS will interpret as a valid connection state. This operation might also cause several &quot;security warning&quot; about connections from your local host IP (127.0.0.1) in the News Feed if you enabled it, which you should interpret as a sign of good communication.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="hiddenpage_servicePort">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="l_serviceAddress">
|
||||
<property name="text">
|
||||
<string>Service Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="l_localAddress">
|
||||
<property name="text">
|
||||
<string>Local Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="hiddenpage_serviceAddress">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is your hidden address. It should look like <span style=" font-weight:600;">[something].onion</span> or <span style=" font-weight:600;">[something].b32.i2p. </span>If you configured a hidden service with Tor, the onion address is generated automatically by Tor. You can get it in e.g. <span style=" font-weight:600;">/var/lib/tor/[service name]/hostname</span>. For I2P: Setup a server tunnel ( http://127.0.0.1:7657/i2ptunnelmgr ) and copy it's base32 address when it is started (should end with .b32.i2p)</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="hiddenpage_localAddress">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is the local address to which the hidden service points at your localhost. Most of the time, <span style=" font-weight:600;">127.0.0.1</span> is the right answer.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<layout class="QHBoxLayout" name="serviceIncomingHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="iconlabel_service_incoming">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="l_incomingTestResult">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This led turns green only if you launch an active test using the above button. </p><p>When it does, it means that your hidden node can be reached from anywhere, using the Tor (resp. I2P) </p><p>network. Congratulations!</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>incoming ok</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="hiddenpage_configurationVLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="l_hiddenpage_configuration">
|
||||
<property name="text">
|
||||
<string>Expected Configuration:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="hiddenpage_configuration">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>Please fill in a service address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="hiddenpageInHelpPlainTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This list gets automatically filled with information gathered at multiple sources: masquerading peers reported by the DHT, IP ranges entered by you, and IP ranges reported by your friends. Default settings should protect you against large scale traffic relaying.</p><p>Automatically guessing masquerading IPs can put your friends IPs in the blacklist. In this case, use the context menu to whitelist them.</p></body></html></string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>To Receive Connections, you must first setup a Tor/I2P Hidden Service.
|
||||
|
||||
For Tor: See torrc and documentation for HOWTO details.
|
||||
|
||||
For I2P: See http://127.0.0.1:7657/i2ptunnelmgr for setting up a server tunnel:
|
||||
Tunnel Wizard -> Server Tunnel -> Standard -> enter a name -> enter the address and port your RS is using (see Local Address above) -> check 'Auto Start' -> finish!
|
||||
|
||||
Once this is done, paste the Onion/I2P (Base32) Address in the box above.
|
||||
This is your external address on the Tor/I2P network.
|
||||
Finally make sure that the Ports match the configuration.
|
||||
|
||||
If you have issues connecting over Tor check the Tor logs too.</string>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>IP range</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Origin</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Reason</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="includeFromFriends_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is very drastic, be careful. Since masquerading IPs might be actual real IPs, this option might cause disconnection, and will probably force you to add your friends' IPs into the whitelist.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ban every IP reported by your friends</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="vspacerHiddenIn">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<widget class="QCheckBox" name="includeFromDHT_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Another drastic option. If you use it, be prepared to add your friends' IPs into the whitelist when needed.</p></body></html></string>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
<property name="text">
|
||||
<string>Ban every masquerading IP reported by your DHT</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="groupIPRangesHLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="groupIPRanges_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>If used alone, this option protects you quite well from large scale IP masquerading.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Automatically ban ranges of DHT masquerading IPs starting at</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="groupIPRanges_SB">
|
||||
<property name="suffix">
|
||||
<string> IPs</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="groupIPRangesHSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="ipWhiteListTabWidget">
|
||||
<attribute name="title">
|
||||
<string>IP whitelist</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="ipWhiteListTabWidgetGLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTableWidget" name="whiteListIpsTable">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>White listed IPs are gathered from the following sources: IPs coming inside a manually exchanged certificate, IP ranges entered by you in this window, or in the security feed items.</p><p>The default behavior for Retroshare is to (1) always allow connection to peers with IP in the whitelist, even if that IP is also blacklisted; (2) optionally require IPs to be in the whitelist. You can change this behavior for each peer in the &quot;Details&quot; window of each Retroshare node. </p></body></html></string>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>IP range</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Origin</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Reason</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="manualInputGBox">
|
||||
<property name="title">
|
||||
<string>Manual input</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="manualInputGBoxVLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="ipinputHLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="ipInput_LE">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enter an IP range. Accepted formats:</p><p>193.190.209.15</p><p>193.190.209.15/24</p><p>193.190.209.15/16</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="ipInputRange_SB">
|
||||
<property name="minimum">
|
||||
<number>16</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>32</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="ipInputComment_LE">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enter any comment you'd like</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ipInputAddBlackList_PB">
|
||||
<property name="text">
|
||||
<string>Add to blacklist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ipInputAddWhiteList_PB">
|
||||
<property name="text">
|
||||
<string>Add to whitelist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="manualInputVSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -187,9 +187,7 @@ public:
|
|||
/** Sets whether the bandwidth graph is always on top. */
|
||||
void setBWGraphAlwaysOnTop(bool alwaysOnTop);
|
||||
|
||||
#ifdef RETROTOR
|
||||
void setHiddenServiceKey() ;
|
||||
#endif
|
||||
|
||||
uint getNewsFeedFlags();
|
||||
void setNewsFeedFlags(uint flags);
|
||||
|
|
|
@ -117,7 +117,7 @@ void BandwidthStatsWidget::updateComboBoxes()
|
|||
{
|
||||
if(*it != ui.service_CB->itemData(indx).toInt())
|
||||
{
|
||||
QString sname = QString::fromUtf8(service_info_map.mServiceList[ ((*it)<<8) + 0x02000000].mServiceName.c_str()) ;
|
||||
QString sname = QString::fromUtf8(service_info_map.mServiceList[RsServiceInfo::RsServiceInfoUIn16ToFullServiceId(*it)].mServiceName.c_str()) ;
|
||||
|
||||
if(ui.service_CB->count() <= indx)
|
||||
ui.service_CB->addItem(sname + " (0x"+QString::number(*it,16)+")",QVariant(*it)) ;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <QPainter>
|
||||
#include <QStylePainter>
|
||||
#include <algorithm> // for sort
|
||||
#include <time.h>
|
||||
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
|
||||
|
@ -467,7 +468,7 @@ static QString getServiceNameString(uint16_t service_id)
|
|||
if(ownServices.mServiceList.find(service_id) == ownServices.mServiceList.end())
|
||||
rsServiceControl->getOwnServices(ownServices);
|
||||
|
||||
return QString::fromUtf8(ownServices.mServiceList[service_id].mServiceName.c_str()) ;
|
||||
return QString::fromUtf8(ownServices.mServiceList[RsServiceInfo::RsServiceInfoUIn16ToFullServiceId(service_id)].mServiceName.c_str()) ;
|
||||
}
|
||||
|
||||
static QString getVirtualPeerStatusString(uint8_t status)
|
||||
|
@ -573,7 +574,7 @@ void GxsNetTunnelsDialog::updateDisplay()
|
|||
for(auto it(groups.begin());it!=groups.end();++it)
|
||||
{
|
||||
painter.drawText(ox+4*cellx,oy+celly,tr("Service: %1 (%2) - Group ID: %3,\t policy: %4, \tstatus: %5, \tlast contact: %6")
|
||||
.arg(QString::number(it->second.service_id))
|
||||
.arg("0x" + QString::number(it->second.service_id, 16))
|
||||
.arg(getServiceNameString(it->second.service_id))
|
||||
.arg(QString::fromStdString(it->first.toStdString()))
|
||||
.arg(getGroupPolicyString(it->second.group_policy))
|
||||
|
|
|
@ -26,12 +26,11 @@
|
|||
#include <QPixmap>
|
||||
|
||||
#include "retroshare/rsconfig.h"
|
||||
#include "retroshare/rsinit.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#ifdef RETROTOR
|
||||
#include "TorControl/TorManager.h"
|
||||
#include "TorControl/TorControl.h"
|
||||
#endif
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
|
@ -86,53 +85,56 @@ void TorStatus::getTorStatus()
|
|||
|
||||
int S = QFontMetricsF(torstatusLabel->font()).height();
|
||||
|
||||
#ifdef RETROTOR
|
||||
// get Tor status
|
||||
int tor_control_status = Tor::TorManager::instance()->control()->status();
|
||||
int torstatus = Tor::TorManager::instance()->control()->torStatus();
|
||||
|
||||
QString tor_control_status_str,torstatus_str ;
|
||||
bool tor_control_ok ;
|
||||
|
||||
switch(tor_control_status)
|
||||
if(RsAccounts::isTorAuto())
|
||||
{
|
||||
default:
|
||||
case Tor::TorControl::Error : tor_control_ok = false ; tor_control_status_str = "Error" ; break ;
|
||||
case Tor::TorControl::NotConnected: tor_control_ok = false ; tor_control_status_str = "Not connected" ; break ;
|
||||
case Tor::TorControl::Connecting: tor_control_ok = false ; tor_control_status_str = "Connecting" ; break ;
|
||||
case Tor::TorControl::Authenticating: tor_control_ok = false ; tor_control_status_str = "Authenticating" ; break ;
|
||||
case Tor::TorControl::Connected: tor_control_ok = true ; tor_control_status_str = "Connected" ; break ;
|
||||
}
|
||||
// get Tor status
|
||||
int tor_control_status = Tor::TorManager::instance()->control()->status();
|
||||
int torstatus = Tor::TorManager::instance()->control()->torStatus();
|
||||
|
||||
switch(torstatus)
|
||||
{
|
||||
default:
|
||||
case Tor::TorControl::TorUnknown: torstatus_str = "Unknown" ; break ;
|
||||
case Tor::TorControl::TorOffline: torstatus_str = "Tor offline" ; break ;
|
||||
case Tor::TorControl::TorReady: torstatus_str = "Tor ready" ; break ;
|
||||
}
|
||||
QString tor_control_status_str,torstatus_str ;
|
||||
bool tor_control_ok ;
|
||||
|
||||
switch(tor_control_status)
|
||||
{
|
||||
default:
|
||||
case Tor::TorControl::Error : tor_control_ok = false ; tor_control_status_str = "Error" ; break ;
|
||||
case Tor::TorControl::NotConnected: tor_control_ok = false ; tor_control_status_str = "Not connected" ; break ;
|
||||
case Tor::TorControl::Connecting: tor_control_ok = false ; tor_control_status_str = "Connecting" ; break ;
|
||||
case Tor::TorControl::Authenticating: tor_control_ok = false ; tor_control_status_str = "Authenticating" ; break ;
|
||||
case Tor::TorControl::Connected: tor_control_ok = true ; tor_control_status_str = "Connected" ; break ;
|
||||
}
|
||||
|
||||
switch(torstatus)
|
||||
{
|
||||
default:
|
||||
case Tor::TorControl::TorUnknown: torstatus_str = "Unknown" ; break ;
|
||||
case Tor::TorControl::TorOffline: torstatus_str = "Tor offline" ; break ;
|
||||
case Tor::TorControl::TorReady: torstatus_str = "Tor ready" ; break ;
|
||||
}
|
||||
|
||||
#define MIN_RS_NET_SIZE 10
|
||||
|
||||
if(torstatus == Tor::TorControl::TorOffline || !online || !tor_control_ok)
|
||||
if(torstatus == Tor::TorControl::TorOffline || !online || !tor_control_ok)
|
||||
{
|
||||
// RED - some issue.
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/tor-stopping.png").scaledToHeight(1.5*S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setToolTip( text + tr("Tor is currently offline"));
|
||||
}
|
||||
else if(torstatus == Tor::TorControl::TorReady && online && tor_control_ok)
|
||||
{
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/tor-on.png").scaledToHeight(1.5*S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setToolTip( text + tr("Tor is OK"));
|
||||
}
|
||||
else // torstatus == Tor::TorControl::TorUnknown
|
||||
{
|
||||
// GRAY.
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/no-tor.png").scaledToHeight(1.5*S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setToolTip( text + tr("No tor configuration"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// RED - some issue.
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/tor-stopping.png").scaledToHeight(1.5*S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/tor-stopping.png").scaledToHeight(S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setToolTip( text + tr("Tor is currently offline"));
|
||||
}
|
||||
else if(torstatus == Tor::TorControl::TorReady && online && tor_control_ok)
|
||||
{
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/tor-on.png").scaledToHeight(1.5*S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setToolTip( text + tr("Tor is OK"));
|
||||
}
|
||||
else // torstatus == Tor::TorControl::TorUnknown
|
||||
{
|
||||
// GRAY.
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/no-tor.png").scaledToHeight(1.5*S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setToolTip( text + tr("No tor configuration"));
|
||||
}
|
||||
#else
|
||||
torstatusLabel->setPixmap(QPixmap(":/icons/tor-stopping.png").scaledToHeight(S,Qt::SmoothTransformation));
|
||||
torstatusLabel->setToolTip( text + tr("Tor is currently offline"));
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
static QMap<RsPlugin*, QTranslator*> translatorPlugins;
|
||||
|
||||
#define EXTERNAL_TRANSLATION_DIR QString::fromUtf8(RsAccounts::DataDirectory().c_str())
|
||||
#define EXTERNAL_TRANSLATION_DIR QString::fromUtf8(RsAccounts::systemDataDirectory().c_str())
|
||||
|
||||
/** Initializes the list of available languages. */
|
||||
QMap<QString, QString>
|
||||
|
|
|
@ -51,10 +51,8 @@
|
|||
# include "gui/settings/WebuiPage.h"
|
||||
#endif
|
||||
|
||||
#ifdef RETROTOR
|
||||
# include "TorControl/TorManager.h"
|
||||
# include "TorControl/TorControlWindow.h"
|
||||
#endif
|
||||
#include "TorControl/TorManager.h"
|
||||
#include "TorControl/TorControlWindow.h"
|
||||
|
||||
#include "retroshare/rsidentity.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
|
@ -349,51 +347,58 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
|
||||
SoundManager::create();
|
||||
|
||||
#ifdef RETROTOR
|
||||
// Now that we know the Tor service running, and we know the SSL id, we can make sure it provides a viable hidden service
|
||||
bool is_hidden_node = false;
|
||||
bool is_auto_tor = false ;
|
||||
bool is_first_time = false ;
|
||||
|
||||
QString tor_hidden_service_dir = QString::fromStdString(RsAccounts::AccountDirectory()) + QString("/hidden_service/") ;
|
||||
RsAccounts::getCurrentAccountOptions(is_hidden_node,is_auto_tor,is_first_time);
|
||||
|
||||
Tor::TorManager *torManager = Tor::TorManager::instance();
|
||||
torManager->setDataDirectory(Rshare::dataDirectory() + QString("/tor/"));
|
||||
torManager->setHiddenServiceDirectory(tor_hidden_service_dir); // re-set it, because now it's changed to the specific location that is run
|
||||
|
||||
RsDirUtil::checkCreateDirectory(std::string(tor_hidden_service_dir.toUtf8())) ;
|
||||
|
||||
torManager->setupHiddenService();
|
||||
|
||||
if(! torManager->start() || torManager->hasError())
|
||||
if(is_auto_tor)
|
||||
{
|
||||
QMessageBox::critical(NULL,QObject::tr("Cannot start Tor Manager!"),QObject::tr("Tor cannot be started on your system: \n\n")+torManager->errorMessage()) ;
|
||||
return 1 ;
|
||||
}
|
||||
// Now that we know the Tor service running, and we know the SSL id, we can make sure it provides a viable hidden service
|
||||
|
||||
{
|
||||
TorControlDialog tcd(torManager) ;
|
||||
QString error_msg ;
|
||||
tcd.show();
|
||||
QString tor_hidden_service_dir = QString::fromStdString(RsAccounts::AccountDirectory()) + QString("/hidden_service/") ;
|
||||
|
||||
while(tcd.checkForTor(error_msg) != TorControlDialog::TOR_STATUS_OK || tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK) // runs until some status is reached: either tor works, or it fails.
|
||||
Tor::TorManager *torManager = Tor::TorManager::instance();
|
||||
torManager->setTorDataDirectory(Rshare::dataDirectory() + QString("/tor/"));
|
||||
torManager->setHiddenServiceDirectory(tor_hidden_service_dir); // re-set it, because now it's changed to the specific location that is run
|
||||
|
||||
RsDirUtil::checkCreateDirectory(std::string(tor_hidden_service_dir.toUtf8())) ;
|
||||
|
||||
torManager->setupHiddenService();
|
||||
|
||||
if(! torManager->start() || torManager->hasError())
|
||||
{
|
||||
QCoreApplication::processEvents();
|
||||
rstime::rs_usleep(0.2*1000*1000) ;
|
||||
|
||||
if(!error_msg.isNull())
|
||||
{
|
||||
QMessageBox::critical(NULL,QObject::tr("Cannot start Tor"),QObject::tr("Sorry but Tor cannot be started on your system!\n\nThe error reported is:\"")+error_msg+"\"") ;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
tcd.hide();
|
||||
|
||||
if(tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK)
|
||||
{
|
||||
QMessageBox::critical(NULL,QObject::tr("Cannot start a hidden tor service!"),QObject::tr("It was not possible to start a hidden service.")) ;
|
||||
QMessageBox::critical(NULL,QObject::tr("Cannot start Tor Manager!"),QObject::tr("Tor cannot be started on your system: \n\n")+torManager->errorMessage()) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
{
|
||||
TorControlDialog tcd(torManager) ;
|
||||
QString error_msg ;
|
||||
tcd.show();
|
||||
|
||||
while(tcd.checkForTor(error_msg) != TorControlDialog::TOR_STATUS_OK || tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK) // runs until some status is reached: either tor works, or it fails.
|
||||
{
|
||||
QCoreApplication::processEvents();
|
||||
rstime::rs_usleep(0.2*1000*1000) ;
|
||||
|
||||
if(!error_msg.isNull())
|
||||
{
|
||||
QMessageBox::critical(NULL,QObject::tr("Cannot start Tor"),QObject::tr("Sorry but Tor cannot be started on your system!\n\nThe error reported is:\"")+error_msg+"\"") ;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
tcd.hide();
|
||||
|
||||
if(tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK)
|
||||
{
|
||||
QMessageBox::critical(NULL,QObject::tr("Cannot start a hidden tor service!"),QObject::tr("It was not possible to start a hidden service.")) ;
|
||||
return 1 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QSplashScreen splashScreen(QPixmap(":/images/logo/logo_splash.png")/* , Qt::WindowStaysOnTopHint*/);
|
||||
|
||||
|
@ -409,33 +414,35 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef RETROTOR
|
||||
// Tor works with viable hidden service. Let's use it!
|
||||
if(is_auto_tor)
|
||||
{
|
||||
// Tor works with viable hidden service. Let's use it!
|
||||
|
||||
QString service_id ;
|
||||
QString onion_address ;
|
||||
uint16_t service_port ;
|
||||
uint16_t service_target_port ;
|
||||
uint16_t proxy_server_port ;
|
||||
QHostAddress service_target_address ;
|
||||
QHostAddress proxy_server_address ;
|
||||
QString service_id ;
|
||||
QString onion_address ;
|
||||
uint16_t service_port ;
|
||||
uint16_t service_target_port ;
|
||||
uint16_t proxy_server_port ;
|
||||
QHostAddress service_target_address ;
|
||||
QHostAddress proxy_server_address ;
|
||||
|
||||
torManager->getHiddenServiceInfo(service_id,onion_address,service_port,service_target_address,service_target_port);
|
||||
torManager->getProxyServerInfo(proxy_server_address,proxy_server_port) ;
|
||||
Tor::TorManager *torManager = Tor::TorManager::instance();
|
||||
torManager->getHiddenServiceInfo(service_id,onion_address,service_port,service_target_address,service_target_port);
|
||||
torManager->getProxyServerInfo(proxy_server_address,proxy_server_port) ;
|
||||
|
||||
std::cerr << "Got hidden service info: " << std::endl;
|
||||
std::cerr << " onion address : " << onion_address.toStdString() << std::endl;
|
||||
std::cerr << " service_id : " << service_id.toStdString() << std::endl;
|
||||
std::cerr << " service port : " << service_port << std::endl;
|
||||
std::cerr << " target port : " << service_target_port << std::endl;
|
||||
std::cerr << " target address : " << service_target_address.toString().toStdString() << std::endl;
|
||||
std::cerr << "Got hidden service info: " << std::endl;
|
||||
std::cerr << " onion address : " << onion_address.toStdString() << std::endl;
|
||||
std::cerr << " service_id : " << service_id.toStdString() << std::endl;
|
||||
std::cerr << " service port : " << service_port << std::endl;
|
||||
std::cerr << " target port : " << service_target_port << std::endl;
|
||||
std::cerr << " target address : " << service_target_address.toString().toStdString() << std::endl;
|
||||
|
||||
std::cerr << "Setting proxy server to " << service_target_address.toString().toStdString() << ":" << service_target_port << std::endl;
|
||||
std::cerr << "Setting proxy server to " << service_target_address.toString().toStdString() << ":" << service_target_port << std::endl;
|
||||
|
||||
rsPeers->setLocalAddress(rsPeers->getOwnId(), service_target_address.toString().toStdString(), service_target_port);
|
||||
rsPeers->setHiddenNode(rsPeers->getOwnId(), onion_address.toStdString(), service_port);
|
||||
rsPeers->setProxyServer(RS_HIDDEN_TYPE_TOR, proxy_server_address.toString().toStdString(),proxy_server_port) ;
|
||||
#endif
|
||||
rsPeers->setLocalAddress(rsPeers->getOwnId(), service_target_address.toString().toStdString(), service_target_port);
|
||||
rsPeers->setHiddenNode(rsPeers->getOwnId(), onion_address.toStdString(), service_port);
|
||||
rsPeers->setProxyServer(RS_HIDDEN_TYPE_TOR, proxy_server_address.toString().toStdString(),proxy_server_port) ;
|
||||
}
|
||||
|
||||
Rshare::initPlugins();
|
||||
|
||||
|
|
|
@ -19,11 +19,9 @@ libresapihttpserver {
|
|||
|
||||
!include("../../libretroshare/src/use_libretroshare.pri"):error("Including")
|
||||
|
||||
retrotor {
|
||||
FORMS += TorControl/TorControlWindow.ui
|
||||
SOURCES += TorControl/TorControlWindow.cpp
|
||||
HEADERS += TorControl/TorControlWindow.h
|
||||
}
|
||||
FORMS += TorControl/TorControlWindow.ui
|
||||
SOURCES += TorControl/TorControlWindow.cpp
|
||||
HEADERS += TorControl/TorControlWindow.h
|
||||
|
||||
#QMAKE_CFLAGS += -fmudflap
|
||||
#LIBS *= /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflap.a /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflapth.a
|
||||
|
@ -285,7 +283,8 @@ wikipoos {
|
|||
LIBS *= $$OUT_PWD/../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
||||
}
|
||||
|
||||
retrotor {
|
||||
# Tor controller
|
||||
|
||||
HEADERS += TorControl/AddOnionCommand.h \
|
||||
TorControl/AuthenticateCommand.h \
|
||||
TorControl/GetConfCommand.h \
|
||||
|
@ -324,7 +323,6 @@ SOURCES += TorControl/AddOnionCommand.cpp \
|
|||
TorControl/SecureRNG.cpp \
|
||||
TorControl/Settings.cpp \
|
||||
TorControl/StrUtil.cpp
|
||||
}
|
||||
|
||||
# Input
|
||||
HEADERS += rshare.h \
|
||||
|
|
|
@ -748,7 +748,7 @@ void Rshare::loadStyleSheet(const QString &sheetName)
|
|||
/* external stylesheet */
|
||||
file.setFileName(QString("%1/qss/%2%3.qss").arg(QString::fromUtf8(RsAccounts::ConfigDirectory().c_str()), name, sheetName));
|
||||
if (!file.exists()) {
|
||||
file.setFileName(QString("%1/qss/%2%3.qss").arg(QString::fromUtf8(RsAccounts::DataDirectory().c_str()), name, sheetName));
|
||||
file.setFileName(QString("%1/qss/%2%3.qss").arg(QString::fromUtf8(RsAccounts::systemDataDirectory().c_str()), name, sheetName));
|
||||
}
|
||||
}
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
|
@ -787,7 +787,7 @@ void Rshare::getAvailableStyleSheets(QMap<QString, QString> &styleSheets)
|
|||
styleSheets.insert(name, name);
|
||||
}
|
||||
}
|
||||
fileInfoList = QDir(QString::fromUtf8(RsAccounts::DataDirectory().c_str()) + "/qss/").entryInfoList(QStringList("*.qss"));
|
||||
fileInfoList = QDir(QString::fromUtf8(RsAccounts::systemDataDirectory().c_str()) + "/qss/").entryInfoList(QStringList("*.qss"));
|
||||
foreach (fileInfo, fileInfoList) {
|
||||
if (fileInfo.isFile()) {
|
||||
QString name = fileInfo.baseName();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue