Merge pull request #2451 from csoler/v0.6-TorNode

V0.6 tor node
This commit is contained in:
csoler 2021-10-06 19:36:49 +02:00 committed by GitHub
commit d9c91ea41d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,11 +247,15 @@ void ConnectProgressDialog::updateStatus()
updateNetworkStatus();
updateContactStatus();
if(!mIsPeerHiddenNode && !mAmIHiddenNode)
{
#ifdef RS_USE_BITDHT
updateDhtStatus();
#endif
updateLookupStatus();
updateUdpStatus();
}
return;
break;
@ -282,10 +286,38 @@ void ConnectProgressDialog::stopAndClose()
void ConnectProgressDialog::updateNetworkStatus()
{
RsNetState netState = rsConfig->getNetState();
QLabel *label = ui->NetResult;
switch(netState)
if(mAmIHiddenNode || mIsPeerHiddenNode)
switch(rsConfig->getNetState())
{
case RsNetState::BAD_UNKNOWN:
label->setText(tr("Unknown State"));
break;
case RsNetState::BAD_OFFLINE:
label->setText(tr("Offline"));
break;
case RsNetState::BAD_NATSYM:
label->setText(tr("Behind Symmetric NAT"));
break;
case RsNetState::WARNING_RESTART:
label->setText(tr("NET Restart"));
break;
case RsNetState::BAD_NODHT_NAT:
case RsNetState::WARNING_NATTED:
label->setText(tr("Behind NAT"));
break;
case RsNetState::WARNING_NODHT:
case RsNetState::GOOD:
label->setText(tr("NET STATE GOOD!"));
break;
case RsNetState::ADV_DARK_FORWARD:
case RsNetState::ADV_FORWARD:
label->setText(tr("UNVERIFIABLE FORWARD!"));
break;
}
else
switch(rsConfig->getNetState())
{
case RsNetState::BAD_UNKNOWN:
label->setText(tr("Unknown State"));
@ -454,14 +486,10 @@ void ConnectProgressDialog::updateLookupStatus()
mState = CONNECT_STATE_FAILED;
if (mLookupStatus == CONNECT_LOOKUP_NODHTCONFIG)
{
sayPeerNoDhtConfig();
}
else
{
sayPeerOffline();
}
}
case CONNECT_LOOKUP_FAIL:
case CONNECT_LOOKUP_ONLINE: