mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 14:41:04 -04:00
added one flag for requiring whitelist clearance before connect. Added GUI checkboxes to set it. Still needs the IP in connect wizard.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8339 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8e0be294ee
commit
ab62eaee32
6 changed files with 36 additions and 4 deletions
|
@ -55,6 +55,8 @@ ServicePermissionDialog::ServicePermissionDialog() :
|
|||
mColumns[column] = RS_NODE_PERM_DIRECT_DL;
|
||||
column = ui->servicePermissionList->addColumn(tr("Auto-download recommended files"));
|
||||
mColumns[column] = RS_NODE_PERM_ALLOW_PUSH;
|
||||
column = ui->servicePermissionList->addColumn(tr("Require whitelist"));
|
||||
mColumns[column] = RS_NODE_PERM_REQUIRE_WL;
|
||||
|
||||
ui->servicePermissionList->start();
|
||||
}
|
||||
|
|
|
@ -137,6 +137,7 @@ void ConfCertDialog::setServiceFlags()
|
|||
|
||||
if( ui._direct_transfer_CB->isChecked()) flags = flags | RS_NODE_PERM_DIRECT_DL ;
|
||||
if( ui._allow_push_CB->isChecked()) flags = flags | RS_NODE_PERM_ALLOW_PUSH ;
|
||||
if( ui._require_WL_CB->isChecked()) flags = flags | RS_NODE_PERM_REQUIRE_WL ;
|
||||
|
||||
rsPeers->setServicePermissionFlags(pgpId,flags) ;
|
||||
}
|
||||
|
@ -162,6 +163,7 @@ void ConfCertDialog::load()
|
|||
|
||||
ui._direct_transfer_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_DIRECT_DL ) ;
|
||||
ui._allow_push_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
||||
ui._require_WL_CB->setChecked( detail.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ;
|
||||
|
||||
//ui.pgpfingerprint->setText(QString::fromUtf8(detail.name.c_str()));
|
||||
ui.peerid->setText(QString::fromStdString(detail.id.toStdString()));
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="stabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="icon">
|
||||
|
@ -445,7 +445,7 @@
|
|||
<string>Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -475,6 +475,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="_require_WL_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Peers that have this option cannot connect if their connection address is not in the whitelist. This protects you from traffic forwarding attacks. When used, rejected peers will be reported by &quot;security feed items&quot; in the News Feed section. From there, you can whitelist/blacklist their IP.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Require white list clearance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
@ -258,6 +258,7 @@ void ConnectFriendWizard::initializePage(int id)
|
|||
|
||||
ui->_direct_transfer_CB_2 ->setChecked(peerDetails.service_perm_flags & RS_NODE_PERM_DIRECT_DL) ;
|
||||
ui->_allow_push_CB_2 ->setChecked(peerDetails.service_perm_flags & RS_NODE_PERM_ALLOW_PUSH) ;
|
||||
ui->_require_WL_CB_2 ->setChecked(peerDetails.service_perm_flags & RS_NODE_PERM_REQUIRE_WL) ;
|
||||
|
||||
RsPeerDetails tmp_det ;
|
||||
bool already_in_keyring = rsPeers->getGPGDetails(peerDetails.gpg_id, tmp_det) ;
|
||||
|
@ -623,9 +624,11 @@ ServicePermissionFlags ConnectFriendWizard::serviceFlags() const
|
|||
{
|
||||
if( ui->_direct_transfer_CB->isChecked()) flags |= RS_NODE_PERM_DIRECT_DL ;
|
||||
if( ui->_allow_push_CB->isChecked()) flags |= RS_NODE_PERM_ALLOW_PUSH ;
|
||||
if( ui->_require_WL_CB->isChecked()) flags |= RS_NODE_PERM_REQUIRE_WL ;
|
||||
} else if (hasVisitedPage(Page_Conclusion)) {
|
||||
if( ui->_direct_transfer_CB_2->isChecked()) flags |= RS_NODE_PERM_DIRECT_DL ;
|
||||
if( ui->_allow_push_CB_2->isChecked()) flags |= RS_NODE_PERM_ALLOW_PUSH ;
|
||||
if( ui->_require_WL_CB_2->isChecked()) flags |= RS_NODE_PERM_REQUIRE_WL ;
|
||||
}
|
||||
return flags ;
|
||||
}
|
||||
|
|
|
@ -694,6 +694,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_require_WL_CB">
|
||||
<property name="text">
|
||||
<string>Require whitelist clearance to connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
|
@ -1020,6 +1027,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="_require_WL_CB_2">
|
||||
<property name="text">
|
||||
<string>Require whitelist clearance to connect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue