File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 66import sys
77import tempfile
88
9+ import six
910from PyQt4 import QtCore , QtGui
1011
1112import debug
@@ -160,6 +161,26 @@ def adjust_from_config(self, config):
160161 else self .comboBoxProxyType .findText (self ._proxy_type ))
161162 self .comboBoxProxyTypeChanged (self .comboBoxProxyType .currentIndex ())
162163
164+ if self ._proxy_type :
165+ for node , info in six .iteritems (
166+ knownnodes .knownNodes .get (
167+ min (state .streamsInWhichIAmParticipating ), [])
168+ ):
169+ if (
170+ node .host .endswith ('.onion' ) and len (node .host ) > 22
171+ and not info .get ('self' )
172+ ):
173+ break
174+ else :
175+ if self .checkBoxOnionOnly .isChecked ():
176+ self .checkBoxOnionOnly .setText (
177+ self .checkBoxOnionOnly .text () + ", " + _translate (
178+ "MainWindow" , "may cause connection problems!" ))
179+ self .checkBoxOnionOnly .setStyleSheet (
180+ "QCheckBox { color : red; }" )
181+ else :
182+ self .checkBoxOnionOnly .setEnabled (False )
183+
163184 self .lineEditSocksHostname .setText (
164185 config .get ('bitmessagesettings' , 'sockshostname' ))
165186 self .lineEditSocksPort .setText (str (
You can’t perform that action at this time.
0 commit comments