fixed update of Tor proxy address in hidden nodes server page

This commit is contained in:
csoler 2017-03-15 19:26:07 +01:00
parent a0d1089559
commit 21143742fd
4 changed files with 13 additions and 3 deletions

View File

@ -1037,6 +1037,9 @@ bool p3Peers::setProxyServer(const uint32_t type, const std::string &addr_str, c
std::cerr << "(EE) attempt to set proxy server address to something not allowed: " << addr_str << ":" << port << std::endl; std::cerr << "(EE) attempt to set proxy server address to something not allowed: " << addr_str << ":" << port << std::endl;
return false ; return false ;
} }
std::cerr << "Settign proxy server address to " << addr_str << ":" << port << std::endl;
struct sockaddr_storage addr; struct sockaddr_storage addr;
struct sockaddr_in *addrv4p = (struct sockaddr_in *) &addr; struct sockaddr_in *addrv4p = (struct sockaddr_in *) &addr;
addrv4p->sin_family = AF_INET; addrv4p->sin_family = AF_INET;

View File

@ -109,7 +109,7 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
connect( ui.netModeComboBox, SIGNAL( activated ( int ) ), this, SLOT( toggleUPnP( ) ) ); connect( ui.netModeComboBox, SIGNAL( activated ( int ) ), this, SLOT( toggleUPnP( ) ) );
connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) ); connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) );
connect( ui.cleanKnownIPs_PB, SIGNAL( clicked( ) ), this, SLOT( clearKnownAddressList() ) ); connect( ui.cleanKnownIPs_PB, SIGNAL( clicked( ) ), this, SLOT( clearKnownAddressList() ) );
connect( ui.testIncoming_PB, SIGNAL( clicked( ) ), this, SLOT( updateInProxyIndicator() ) ); connect( ui.testIncoming_PB, SIGNAL( clicked( ) ), this, SLOT( saveAndTestInProxy() ) );
connect( ui.showDiscStatusBar,SIGNAL(toggled(bool)),this,SLOT(updateShowDiscStatusBar())) ; connect( ui.showDiscStatusBar,SIGNAL(toggled(bool)),this,SLOT(updateShowDiscStatusBar())) ;
#ifdef SERVER_DEBUG #ifdef SERVER_DEBUG
@ -132,6 +132,12 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.totalUploadRate, SIGNAL(valueChanged(int)),this,SLOT(saveRates())); connect(ui.totalUploadRate, SIGNAL(valueChanged(int)),this,SLOT(saveRates()));
} }
void ServerPage::saveAndTestInProxy()
{
saveAddresses();
updateInProxyIndicator() ;
}
void ServerPage::checkIpRange(const QString& ipstr) void ServerPage::checkIpRange(const QString& ipstr)
{ {
QColor color; QColor color;

View File

@ -61,6 +61,7 @@ private slots:
// ban list // ban list
void updateSelectedBlackListIP(int row, int, int, int); void updateSelectedBlackListIP(int row, int, int, int);
void updateSelectedWhiteListIP(int row,int,int,int); void updateSelectedWhiteListIP(int row,int,int,int);
void saveAndTestInProxy();
void addIpRangeToBlackList(); void addIpRangeToBlackList();
void addIpRangeToWhiteList(); void addIpRangeToWhiteList();
void moveToWhiteList0(); void moveToWhiteList0();

View File

@ -26,7 +26,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>2</number>
</property> </property>
<widget class="QWidget" name="tabNetConf"> <widget class="QWidget" name="tabNetConf">
<attribute name="title"> <attribute name="title">
@ -985,7 +985,7 @@ You can connect to Hidden Nodes, even if you are running a standard Node, so why
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;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 &amp;quot;security warning&amp;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.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;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 &amp;quot;security warning&amp;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.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="text"> <property name="text">
<string>Test</string> <string>Apply</string>
</property> </property>
</widget> </widget>
</item> </item>