diff options
32 files changed, 122 insertions, 52 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b429595b..4faceb98 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,40 @@ History 2014 ==== +0.5.2 June 6 -- the "are we there yet" release: ++++++++++++++++++++++++++++++++++++++++++++++++ + +- Unblock local multicast IPs from linux firewall, to allow SSDP and + Bonjour/mDNS to work. +- Add support for gnome-shell polkit agent. Closes #4144, #4218. +- Update username regex to support the same as webapp. Closes #5965. +- Wrong error message for username too short. Fixes #5697. +- Cleanup and refactor username/password validators. +- Fix EIP autostart failing. Closes #5721. +- Block ipv6 traffic for the moment. Closes #5693 +- Fix bug with ipv6 blocking that caused block to not get removed from + firewall when Bitmask quit. +- Bring firewall down when switching EIP off. Closes #5687 +- Add OPENVPN_BIN_PATH for OSX so that EIP starts properly. +- Allow usernames to end in a digit. +- Improve signal handling in the mainwindow and wizard. +- Enable UI when OpenVPN bin is not found, plus check before starting + EIP. Fixes #5619. +- Properly set the userid for SMTP. +- Update EIP UI if it fails to download the config. +- Make use of cmdline in psutil backwards-compatible. Closes #5689 +- Add versioning support to bitmask-root. +- Show flag of country for eip exit node, if available. Related #1232 +- Fix nameserver restoring. Closes #5692 +- Warn user if resolvconf cannot be found. +- Refactor Keymanager to backend. Closes #5711. +- Cleanup backend from hacks. Closes #5698. +- Improve wait and quit process. +- Move soledad password change to backend. +- Move Mail logic to backend. +- Separate imap/smtp logic from conductor. +- Refactor SoledadBootstrapper to backend. Closes #5481. + 0.5.1 May 16 -- the "lil less leaky" release: +++++++++++++++++++++++++++++++++++++++++++++ @@ -22,7 +22,7 @@ PROJFILE = data/bitmask.pro #UI files to compile UI_FILES = loggerwindow.ui mainwindow.ui wizard.ui login.ui preferences.ui eip_status.ui mail_status.ui eippreferences.ui advanced_key_management.ui #Qt resource files to compile -RESOURCES = locale.qrc loggerwindow.qrc mainwindow.qrc icons.qrc +RESOURCES = locale.qrc loggerwindow.qrc mainwindow.qrc icons.qrc eipstatus.qrc #pyuic4 and pyrcc4 binaries PYUIC = pyside-uic diff --git a/changes/allow-local-multicast-in-firewall b/changes/allow-local-multicast-in-firewall deleted file mode 100644 index 4c17b92e..00000000 --- a/changes/allow-local-multicast-in-firewall +++ /dev/null @@ -1,2 +0,0 @@ -- unblock local multicast IPs from linux firewall, to allow SSDP and Bonjour/mDNS to work. -- fix bug with ipv6 blocking that caused block to not get removed from firewall when Bitmask quit.
\ No newline at end of file diff --git a/changes/bug-4144_support-gnome-shell-polkit b/changes/bug-4144_support-gnome-shell-polkit deleted file mode 100644 index b8da093c..00000000 --- a/changes/bug-4144_support-gnome-shell-polkit +++ /dev/null @@ -1 +0,0 @@ -- Add support for gnome-shell polkit agent. Closes #4144, #4218. diff --git a/changes/bug-5540_change-password-fix b/changes/bug-5540_change-password-fix deleted file mode 100644 index 9c9c09d5..00000000 --- a/changes/bug-5540_change-password-fix +++ /dev/null @@ -1 +0,0 @@ -Change password doesn't work. Closes #5540. diff --git a/changes/bug-5695_fix-username-regex-support b/changes/bug-5695_fix-username-regex-support deleted file mode 100644 index 855ec149..00000000 --- a/changes/bug-5695_fix-username-regex-support +++ /dev/null @@ -1,3 +0,0 @@ -- Update username regex to support the same as webapp. Closes #5965. -- Wrong error message for username too short. (Bug #5697) -- Cleanup and refactor username/password validators. diff --git a/changes/bug-5721_eip-autostart-is-broken b/changes/bug-5721_eip-autostart-is-broken deleted file mode 100644 index ab1ea512..00000000 --- a/changes/bug-5721_eip-autostart-is-broken +++ /dev/null @@ -1 +0,0 @@ -- Fix EIP autostart failing. Closes #5721. diff --git a/changes/bug-block-ipv6-clientside b/changes/bug-block-ipv6-clientside deleted file mode 100644 index 9e6b88c4..00000000 --- a/changes/bug-block-ipv6-clientside +++ /dev/null @@ -1 +0,0 @@ -- Block ipv6 traffic for the moment. Closes: #5693 diff --git a/changes/bug_5687_switch-eip-off b/changes/bug_5687_switch-eip-off deleted file mode 100644 index 4cf0d24a..00000000 --- a/changes/bug_5687_switch-eip-off +++ /dev/null @@ -1 +0,0 @@ -- Bring firewall down when switching EIP off. Closes: #5687 diff --git a/changes/bug_add_openvpn_bin_path_osx b/changes/bug_add_openvpn_bin_path_osx deleted file mode 100644 index 367b5b8e..00000000 --- a/changes/bug_add_openvpn_bin_path_osx +++ /dev/null @@ -1 +0,0 @@ -- Add OPENVPN_BIN_PATH for OSX so that EIP starts properly.
\ No newline at end of file diff --git a/changes/bug_allow-usernames-ending-with-digit b/changes/bug_allow-usernames-ending-with-digit deleted file mode 100644 index de47e7ac..00000000 --- a/changes/bug_allow-usernames-ending-with-digit +++ /dev/null @@ -1 +0,0 @@ -- Allow usernames to end in a digit. diff --git a/changes/bug_improve_signal_handling b/changes/bug_improve_signal_handling deleted file mode 100644 index 4f88747f..00000000 --- a/changes/bug_improve_signal_handling +++ /dev/null @@ -1 +0,0 @@ -- Improve signal handling in the mainwindow and wizard.
\ No newline at end of file diff --git a/changes/bug_openvpn_not_found b/changes/bug_openvpn_not_found deleted file mode 100644 index c2363122..00000000 --- a/changes/bug_openvpn_not_found +++ /dev/null @@ -1 +0,0 @@ -- Enable UI when OpenVPN bin is not found, plus check before starting EIP. Fixes #5619.
\ No newline at end of file diff --git a/changes/bug_set_userid b/changes/bug_set_userid deleted file mode 100644 index 050a8808..00000000 --- a/changes/bug_set_userid +++ /dev/null @@ -1 +0,0 @@ -- Properly set the userid for SMTP.
\ No newline at end of file diff --git a/changes/bug_update_ui_when_fails_at_config b/changes/bug_update_ui_when_fails_at_config deleted file mode 100644 index 84f19401..00000000 --- a/changes/bug_update_ui_when_fails_at_config +++ /dev/null @@ -1 +0,0 @@ -- Update EIP UI if it fails to download the config.
\ No newline at end of file diff --git a/changes/feature-5689-psutil-compat b/changes/feature-5689-psutil-compat deleted file mode 100644 index be11aea3..00000000 --- a/changes/feature-5689-psutil-compat +++ /dev/null @@ -1 +0,0 @@ -- Make use of cmdline in psutil backwards-compatible. Closes: #5689 diff --git a/changes/feature-bitmask-root-versioning b/changes/feature-bitmask-root-versioning deleted file mode 100644 index bfe69041..00000000 --- a/changes/feature-bitmask-root-versioning +++ /dev/null @@ -1 +0,0 @@ -- Add versioning support to bitmask-root. diff --git a/changes/feature_5692-fix-nameserver-restoring b/changes/feature_5692-fix-nameserver-restoring deleted file mode 100644 index 10ce3427..00000000 --- a/changes/feature_5692-fix-nameserver-restoring +++ /dev/null @@ -1 +0,0 @@ -- Fix nameserver restoring. Closes: #5692 diff --git a/changes/feature_init-check-resolvconf b/changes/feature_init-check-resolvconf deleted file mode 100644 index 81733910..00000000 --- a/changes/feature_init-check-resolvconf +++ /dev/null @@ -1 +0,0 @@ -- Warn user if resolvconf cannot be found. diff --git a/changes/refactor-and-cleanup b/changes/refactor-and-cleanup deleted file mode 100644 index 18331ed4..00000000 --- a/changes/refactor-and-cleanup +++ /dev/null @@ -1,3 +0,0 @@ -- Refactor Keymanager to backend. Closes #5711. -- Cleanup backend from hacks. Closes #5698. - diff --git a/changes/refactor-mail-soledad b/changes/refactor-mail-soledad deleted file mode 100644 index 32b1ab5b..00000000 --- a/changes/refactor-mail-soledad +++ /dev/null @@ -1,5 +0,0 @@ -- Improve wait and quit process. -- Move soledad password change to backend. -- Move Mail logic to backend. -- Separate imap/smtp logic from conductor. -- Refactor SoledadBootstrapper to backend. Closes #5481. diff --git a/data/images/countries/nl.png b/data/images/countries/nl.png Binary files differnew file mode 100644 index 00000000..fe44791e --- /dev/null +++ b/data/images/countries/nl.png diff --git a/data/images/countries/tr.png b/data/images/countries/tr.png Binary files differnew file mode 100644 index 00000000..be32f77e --- /dev/null +++ b/data/images/countries/tr.png diff --git a/data/images/countries/us.png b/data/images/countries/us.png Binary files differnew file mode 100644 index 00000000..10f451fe --- /dev/null +++ b/data/images/countries/us.png diff --git a/data/resources/eipstatus.qrc b/data/resources/eipstatus.qrc new file mode 100644 index 00000000..5d0f2924 --- /dev/null +++ b/data/resources/eipstatus.qrc @@ -0,0 +1,7 @@ +<RCC> + <qresource prefix="/"> + <file>../images/countries/nl.png</file> + <file>../images/countries/tr.png</file> + <file>../images/countries/us.png</file> + </qresource> +</RCC> diff --git a/relnotes.txt b/relnotes.txt index 2704d6f0..e95e8c15 100644 --- a/relnotes.txt +++ b/relnotes.txt @@ -1,8 +1,8 @@ -ANNOUNCING Bitmask, the Internet Encryption Toolkit, release 0.5.1 +ANNOUNCING Bitmask, the Internet Encryption Toolkit, release 0.5.2 The LEAP team is pleased to announce the immediate availability of -version 0.5.1 of Bitmask, the Internet Encryption Toolkit, codename -"lil less leaky". +version 0.5.2 of Bitmask, the Internet Encryption Toolkit, codename +"are we there yet". https://downloads.leap.se/client/ @@ -43,13 +43,9 @@ NOT trust your life to it. WHAT CAN THIS VERSION OF BITMASK DO FOR ME? -Bitmask 0.5.1 improves greatly its mail support and stability in -general, among other various bug fixes. You can refer to the CHANGELOG -for the meat. - -As always, you can connect to the Encrypted Internet Proxy service -offered by a provider of your choice, and enjoy a encrypted internet -connection that the spying eyes can only track back to your provider. +Bitmask 0.5.2 improves greatly its Encrypted internet support and +stability in general, among other various bug fixes. You can refer to +the CHANGELOG for the meat. Encrypted Internet on Linux now helps you don't shoot yourself in the foot by leaking traffic outside of the secure connection it @@ -108,6 +104,6 @@ beyond any border. The LEAP team, -May 16, 2014 +June 6, 2014 Somewhere in the middle of the intertubes. EOF diff --git a/src/leap/bitmask/config/flags.py b/src/leap/bitmask/config/flags.py index 6b70659d..2f3fdde4 100644 --- a/src/leap/bitmask/config/flags.py +++ b/src/leap/bitmask/config/flags.py @@ -55,3 +55,5 @@ OPENVPN_VERBOSITY = 1 # Skip the checks in the wizard, use for testing purposes only! SKIP_WIZARD_CHECKS = False + +CURRENT_VPN_COUNTRY = None diff --git a/src/leap/bitmask/gui/eip_status.py b/src/leap/bitmask/gui/eip_status.py index dcd7ef42..8b9f2d44 100644 --- a/src/leap/bitmask/gui/eip_status.py +++ b/src/leap/bitmask/gui/eip_status.py @@ -24,6 +24,7 @@ from functools import partial from PySide import QtCore, QtGui +from leap.bitmask.config import flags from leap.bitmask.services import get_service_display_name, EIP_SERVICE from leap.bitmask.platform_init import IS_LINUX from leap.bitmask.util.averages import RateMovingAverage @@ -420,6 +421,7 @@ class EIPStatusWidget(QtGui.QWidget): Sets the state of the widget to how it should look after EIP has stopped """ + self.set_country_code("") self._reset_traffic_rates() self.ui.eip_bandwidth.hide() @@ -585,6 +587,25 @@ class EIPStatusWidget(QtGui.QWidget): self.tr("Routing traffic through: <b>{0}</b>").format( provider)) + ccode = flags.CURRENT_VPN_COUNTRY + if ccode is not None: + self.set_country_code(ccode) + + def set_country_code(self, code): + """ + Set the pixmap of the given country code + + :param code: the country code + :type code: str + """ + if code is not None and len(code) == 2: + img = ":/images/countries/%s.png" % (code.lower(),) + else: + img = None + cc = self.ui.lblGatewayCountryCode + cc.setPixmap(QtGui.QPixmap(img)) + cc.setToolTip(code) + def aborted(self): """ Notify the state machine that EIP was aborted for some reason. @@ -707,3 +728,6 @@ class EIPStatusWidget(QtGui.QWidget): """ self.set_eip_status("", error=error) self.set_eip_status_icon("error") + +import eipstatus_rc +assert(eipstatus_rc) diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 71885a78..885cb792 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -1461,6 +1461,7 @@ class MainWindow(QtGui.QMainWindow): self._already_started_eip = True # check for connectivity + # we might want to leave a little time here... self._check_name_resolution(domain) def _check_name_resolution(self, domain): diff --git a/src/leap/bitmask/gui/ui/eip_status.ui b/src/leap/bitmask/gui/ui/eip_status.ui index 892f0f00..7216bb0a 100644 --- a/src/leap/bitmask/gui/ui/eip_status.ui +++ b/src/leap/bitmask/gui/ui/eip_status.ui @@ -28,7 +28,7 @@ <property name="verticalSpacing"> <number>0</number> </property> - <item row="0" column="3"> + <item row="0" column="4"> <widget class="QPushButton" name="btnEipStartStop"> <property name="text"> <string>Turn On</string> @@ -51,7 +51,7 @@ </property> </widget> </item> - <item row="3" column="1"> + <item row="3" column="2"> <widget class="QLabel" name="lblEIPStatus"> <property name="maximumSize"> <size> @@ -70,7 +70,7 @@ </property> </widget> </item> - <item row="0" column="1"> + <item row="0" column="2"> <widget class="QLabel" name="lblEIPMessage"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> @@ -86,7 +86,7 @@ </property> </widget> </item> - <item row="0" column="4"> + <item row="0" column="5"> <widget class="QLabel" name="lblVPNStatusIcon"> <property name="maximumSize"> <size> @@ -105,7 +105,7 @@ </property> </widget> </item> - <item row="1" column="1"> + <item row="1" column="2"> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -118,7 +118,7 @@ </property> </spacer> </item> - <item row="2" column="1" colspan="4"> + <item row="2" column="2" colspan="4"> <widget class="QWidget" name="eip_bandwidth" native="true"> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="spacing"> @@ -239,13 +239,20 @@ </layout> </widget> </item> - <item row="0" column="2"> + <item row="0" column="3"> <widget class="QPushButton" name="btnFwDown"> <property name="text"> <string>Turn Off</string> </property> </widget> </item> + <item row="0" column="1"> + <widget class="QLabel" name="lblGatewayCountryCode"> + <property name="text"> + <string/> + </property> + </widget> + </item> </layout> </item> </layout> diff --git a/src/leap/bitmask/services/eip/eipconfig.py b/src/leap/bitmask/services/eip/eipconfig.py index 09a3d257..e7419b22 100644 --- a/src/leap/bitmask/services/eip/eipconfig.py +++ b/src/leap/bitmask/services/eip/eipconfig.py @@ -110,7 +110,7 @@ class VPNGatewaySelector(object): def get_gateways_list(self): """ - Returns the existing gateways, sorted by timezone proximity. + Return the existing gateways, sorted by timezone proximity. :rtype: list of tuples (location, ip) (str, IPv4Address or IPv6Address object) @@ -148,16 +148,36 @@ class VPNGatewaySelector(object): def get_gateways(self): """ - Returns the 4 best gateways, sorted by timezone proximity. + Return the 4 best gateways, sorted by timezone proximity. :rtype: list of IPv4Address or IPv6Address object. """ gateways = [ip for location, ip in self.get_gateways_list()][:4] return gateways + def get_gateways_country_code(self): + """ + Return a dict with ipaddress -> country code mapping. + + :rtype: dict + """ + country_codes = {} + + locations = self._eipconfig.get_locations() + gateways = self._eipconfig.get_gateways() + + for idx, gateway in enumerate(gateways): + gateway_location = gateway.get('location') + + ip = self._eipconfig.get_gateway_ip(idx) + if gateway_location is not None: + ccode = locations[gateway['location']]['country_code'] + country_codes[ip] = ccode + return country_codes + def _get_timezone_distance(self, offset): ''' - Returns the distance between the local timezone and + Return the distance between the local timezone and the one with offset 'offset'. :param offset: the distance of a timezone to GMT. @@ -179,7 +199,7 @@ class VPNGatewaySelector(object): def _get_local_offset(self): ''' - Returns the distance between GMT and the local timezone. + Return the distance between GMT and the local timezone. :rtype: int ''' diff --git a/src/leap/bitmask/services/eip/vpnlauncher.py b/src/leap/bitmask/services/eip/vpnlauncher.py index dcb48e8a..9629afae 100644 --- a/src/leap/bitmask/services/eip/vpnlauncher.py +++ b/src/leap/bitmask/services/eip/vpnlauncher.py @@ -25,6 +25,7 @@ import stat from abc import ABCMeta, abstractmethod from functools import partial +from leap.bitmask.config import flags from leap.bitmask.config.leapsettings import LeapSettings from leap.bitmask.config.providerconfig import ProviderConfig from leap.bitmask.platform_init import IS_LINUX @@ -122,9 +123,9 @@ class VPNLauncher(object): leap_settings = LeapSettings() domain = providerconfig.get_domain() gateway_conf = leap_settings.get_selected_gateway(domain) + gateway_selector = VPNGatewaySelector(eipconfig) if gateway_conf == leap_settings.GATEWAY_AUTOMATIC: - gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() else: gateways = [gateway_conf] @@ -133,6 +134,12 @@ class VPNLauncher(object): logger.error('No gateway was found!') raise VPNLauncherException('No gateway was found!') + # this only works for selecting the first gateway, as we're + # currently doing. + ccodes = gateway_selector.get_gateways_country_code() + gateway_ccode = ccodes[gateways[0]] + flags.CURRENT_VPN_COUNTRY = gateway_ccode + logger.debug("Using gateways ips: {0}".format(', '.join(gateways))) return gateways |