bitmask-dev issueshttps://0xacab.org/leap/bitmask-dev/-/issues2017-09-05T14:13:26Zhttps://0xacab.org/leap/bitmask-dev/-/issues/9016refactor vpn management module2017-09-05T14:13:26ZKali Kanekorefactor vpn management moduleSome factors to take into account from previous reviews:
* [x] use a twisted protocol, and a string-based endpoint for tcp/unix sockets.
* [x] reduce the level of indirection
* [x] remove the looping calls
* [x] use the management inter...Some factors to take into account from previous reviews:
* [x] use a twisted protocol, and a string-based endpoint for tcp/unix sockets.
* [x] reduce the level of indirection
* [x] remove the looping calls
* [x] use the management interface for displaying logs and state.
* [x] centralize status parsing
* [x] keep a log of state transitions that the ui/cli can request.
* [x] add unit tests0.10Kali KanekoKali Kanekohttps://0xacab.org/leap/bitmask-dev/-/issues/9072Provide debian sid packages2017-09-29T14:47:20ZmicahProvide debian sid packagesTodo:
- [x] sid base debian docker image
- [x] sid gitlab-buildpackage docker image
- [x] [leap-pycommon MR ready](https://0xacab.org/leap/leap_pycommon/merge_requests/10)
- [x] [bitmask-dev MR ready](https://0xacab.org/leap/bitmask-de...Todo:
- [x] sid base debian docker image
- [x] sid gitlab-buildpackage docker image
- [x] [leap-pycommon MR ready](https://0xacab.org/leap/leap_pycommon/merge_requests/10)
- [x] [bitmask-dev MR ready](https://0xacab.org/leap/bitmask-dev/merge_requests/191)
related:
#8965
bitmask-dev!187
leap_pycommon!8
#9060micahmicahhttps://0xacab.org/leap/bitmask-dev/-/issues/9073bonafide: fail to login if provider's api url != api.domain:44302017-10-06T16:47:03Zmeskiobonafide: fail to login if provider's api url != api.domain:4430It looks like `src/leap/bitmask/bonafide/config.py:201` hardcodes the api url in some cases.It looks like `src/leap/bitmask/bonafide/config.py:201` hardcodes the api url in some cases.0.10.1meskiomeskiohttps://0xacab.org/leap/bitmask-dev/-/issues/9078__init__() takes exactly 3 arguments (2 given)2017-09-29T15:08:00Zmicah__init__() takes exactly 3 arguments (2 given)When I run the Buster packaged bitmask-qt or bitmask-chromium package and I put my username and password into the login fields and then hit the Login button, I see in a red notification box above the login the following:
```__init__() t...When I run the Buster packaged bitmask-qt or bitmask-chromium package and I put my username and password into the login fields and then hit the Login button, I see in a red notification box above the login the following:
```__init__() takes exactly 3 arguments (2 given)```
![Pasted_1_](/uploads/78d3eaccd61d743e5c45951ee22c1962/Pasted_1_.png)0.10meskiomeskiohttps://0xacab.org/leap/bitmask-dev/-/issues/9137DNS not working on ubuntu artful 17.102018-10-25T15:43:47ZVaracDNS not working on ubuntu artful 17.10DNS resolution is blocked after I connect to demo.bm VPN:
```
--- ~ » host ix.de
../../../../lib/isc/unix/net.c:581: sendmsg() failed: Operation not permitted
Host ix.de not found: 5(REFUSED)
--- ~ » host ix.de 4.2.2.2
../../../../lib...DNS resolution is blocked after I connect to demo.bm VPN:
```
--- ~ » host ix.de
../../../../lib/isc/unix/net.c:581: sendmsg() failed: Operation not permitted
Host ix.de not found: 5(REFUSED)
--- ~ » host ix.de 4.2.2.2
../../../../lib/isc/unix/net.c:581: sendmsg() failed: Operation not permitted
Using domain server:
Name: 4.2.2.2
Address: 4.2.2.2#53
Aliases:
ix.de has address 193.99.144.80
ix.de has IPv6 address 2a02:2e0:3fe:1001:302::
ix.de mail is handled by 10 relay.heise.de.
ix.de mail is handled by 50 secondarymx.heise.de.
--- ~ » sudo iptables -nL
[sudo] password for varac:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DOCKER-ISOLATION all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
DOCKER all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
bitmask all -- 0.0.0.0/0 0.0.0.0/0
Chain DOCKER (1 references)
target prot opt source destination
Chain DOCKER-ISOLATION (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/0
Chain bitmask (1 references)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 10.1.1.0/24
ACCEPT udp -- 10.1.1.0/24 0.0.0.0/0 udp dpt:53
ACCEPT tcp -- 10.1.1.0/24 0.0.0.0/0 tcp dpt:53
RETURN udp -- 0.0.0.0/0 239.255.255.250 udp dpt:1900
RETURN udp -- 0.0.0.0/0 224.0.0.251 udp dpt:5353
ACCEPT all -- 0.0.0.0/0 46.165.242.169
ACCEPT all -- 0.0.0.0/0 198.252.153.84
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
```
I'm using latest artful packages which are the same commit as the 0.10.2 release:
```
--- ~ » dpkg -l|grep bitmask
ii bitmask 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all Metapackage to install bitmask desktop client
ii bitmask-chromium 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all Bitmask chromium launcher
ii bitmask-core 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all Provides the core daemon for bitmask
ii bitmask-js 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all bitmask javascript library
ii bitmask-mail 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all Bitmask mail components
ii bitmask-mua 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all Pixelated MUA for LEAP bitmask mail
ii bitmask-qt 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all Bitmask desktop client (qt5) to access LEAP Services
ii bitmask-vpn 0.10.0+0~20171102172742.25354+master+artful~43.g4e7f9081 all Bitmask core VPN daemon
```
Log: [bitmaskd.log](/uploads/22f26bbdfe90cf19a7d9298d478a8e9d/bitmaskd.log)0.10.3meskiomeskiohttps://0xacab.org/leap/bitmask-dev/-/issues/9159Fix e2e mail test2017-12-01T09:49:48ZVaracFix e2e mail testThe [e2e test timeouts](https://0xacab.org/leap/bitmask-dev/-/jobs/27564) after:
```
$ make test_e2e
# if there's no sudo, assumming this is running as root by the CI
test -f /usr/bin/sudo && sudo cp src/leap/bitmask/vpn/helpers/linux/b...The [e2e test timeouts](https://0xacab.org/leap/bitmask-dev/-/jobs/27564) after:
```
$ make test_e2e
# if there's no sudo, assumming this is running as root by the CI
test -f /usr/bin/sudo && sudo cp src/leap/bitmask/vpn/helpers/linux/bitmask-root /usr/local/sbin/ || cp src/leap/bitmask/vpn/helpers/linux/bitmask-root /usr/local/sbin/
test -f /usr/bin/sudo && sudo cp src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy /usr/share/polkit-1/actions/se.bitmask.bundle.policy || cp src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy /usr/share/polkit-1/actions/se.bitmask.bundle.policy
tests/e2e/e2e-test-mail.sh
Running with xtrace disabled!
WARNING:vext:Could not add extra path: /usr/share/sip
stop ok
WARNING:vext:Could not add extra path: /usr/share/sip
start ok
WARNING:vext:Could not add extra path: /usr/share/sip
signup ok
user tmp_user_20171123191811
created user. authenticating...
WARNING:vext:Could not add extra path: /usr/share/sip
WARNING:vext:Could not add extra path: /usr/share/sip
WARNING:vext:Could not add extra path: /usr/share/sip
…
```
The upgrade to the artful docker image seems related, because before the e2e test was working fine.
When running in verbose mode, `tests/e2e/e2e-test-mail.sh` loops because `bitmaskctl mail get_token` doesn't get a token back:
```
(py27-dev) root@runner--project-0-concurrent-0:/builds/project-0# bash -x tests/e2e/e2e-test-mail.sh
++ echo 'token None
user tmp_user_20171124085521@mail.bitmask.net'
++ head -n 1
++ sed 's/ */ /g'
++ cut '-d ' -f 2
+ imap_pw=None
+ [[ None == *\N\o\n\e* ]]
++ bitmaskctl mail get_token
+ response='token None
user tmp_user_20171124085521@mail.bitmask.net'
+ sleep 2
```0.10.3meskiomeskiohttps://0xacab.org/leap/bitmask-dev/-/issues/9160Tox uses python3 to setup virtualenv2017-11-30T13:47:20ZVaracTox uses python3 to setup virtualenvI am trying to run the e2e tests locally with gitlab-runner but it fails:
```
--- git/bitmask-dev ‹master* M⁇› » gitlab-runner exec docker --docker-privileged --env BITMASK_INVITE_CODE="$BITMASK_INVITE_CODE" --env TEST_PASSWORD="$TEST_P...I am trying to run the e2e tests locally with gitlab-runner but it fails:
```
--- git/bitmask-dev ‹master* M⁇› » gitlab-runner exec docker --docker-privileged --env BITMASK_INVITE_CODE="$BITMASK_INVITE_CODE" --env TEST_PASSWORD="$TEST_PASSWORD" --env TEST_USERNAME="$TEST_USERNAME" e2e_tests
WARNING: Since GitLab Runner 10.0 this command is marked as DEPRECATED and will be removed in one of upcoming releases
WARNING: You most probably have uncommitted changes.
WARNING: These changes will not be tested.
Running with gitlab-runner 10.1.0 (c1ecf97f)
on ()
Using Docker executor with image 0xacab.org:4567/leap/bitmask-dev:latest ...
Using docker image sha256:e8b05efb69792231956c2ecaa30178353800a829b5fd47d2d31ecf211e802f67 for predefined container...
Pulling docker image 0xacab.org:4567/leap/bitmask-dev:latest ...
Using docker image 0xacab.org:4567/leap/bitmask-dev:latest ID=sha256:79a3815b2b46e423beddb95e4beeb565ad6096805f4a4c9965fa7f43e403881e for build container...
Running on runner--project-0-concurrent-0 via rocinante...
Cloning repository...
Cloning into '/builds/project-0'...
done.
Checking out 7622e66f as master...
Skipping Git submodules setup
$ dpkg -l tox > /dev/null || apt-get -y --no-install-recommends install tox
$ tox -e py27-dev --notest
py27-dev create: /builds/project-0/.tox/py27-dev
ERROR: invocation failed (exit code 1), logfile: /builds/project-0/.tox/py27-dev/log/py27-dev-0.log
ERROR: actionid: py27-dev
msg: getenv
cmdargs: ['/usr/bin/python3', '-m', 'virtualenv', '--python', '/usr/bin/python2.7', 'py27-dev']
env: {'DOCKER_DRIVER': 'overlay', 'CI_JOB_TOKEN': '', 'CI_JOB_NAME': 'e2e_tests', 'CI_SERVER_VERSION': '', 'LANG': 'en_US.utf8', 'GITLAB_CI': 'true', 'CI_SERVER_REVISION': '', 'TEST_USERNAME': 'testuser1@demo.bitmask.net', 'HOSTNAME': 'runner--project-0-concurrent-0', 'OLDPWD': '/tmp', 'CI_DISPOSABLE_ENVIRONMENT': 'true', 'TEST_PASSWORD': 'Rvhi6z3sbJIyL/JO7', 'CI_SERVER_NAME': 'GitLab CI', 'CI': 'true', 'CI_PROJECT_ID': '0', 'PWD': '/builds/project-0', 'HOME': '/tmp', 'CI_COMMIT_BEFORE_SHA': '99700bb2ff808784bf227a5ce000fe833fc99617', 'DEBIAN_FRONTEND': 'noninteractive', 'CI_COMMIT_REF_NAME': 'master', 'CI_SERVER': 'yes', 'CI_JOB_ID': '1', 'CI_REPOSITORY_URL': '/home/varac/leap/git/bitmask-dev', 'BITMASK_INVITE_CODE': 'rjfp-jpnx', 'SHLVL': '1', 'CI_COMMIT_REF': '7622e66fd31f3d23d36186e357e9bf95c459fdda', 'PATH': '/builds/project-0/.tox/py27-dev/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'CI_PROJECT_DIR': '/builds/project-0', 'CI_JOB_STAGE': 'e2e', '_': '/usr/bin/tox', 'CPPFLAGS': "'-I/usr/local/include/sqlcipher'", 'LDFLAGS': "'-L/usr/local/lib'", 'PYTHONHASHSEED': '1015584748', 'VIRTUAL_ENV': '/builds/project-0/.tox/py27-dev'}
New python executable in /builds/project-0/.tox/py27-dev/bin/python2.7
Also creating executable in /builds/project-0/.tox/py27-dev/bin/python
Installing setuptools, pkg_resources, pip, wheel...
Complete output from command /builds/project-0/.tox/py27-dev/bin/python2.7 - setuptools pkg_resources pip wheel:
Collecting setuptools
Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/builds/project-0/.tox/py27-dev/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/builds/project-0/.tox/py27-dev/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/builds/project-0/.tox/py27-dev/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/builds/project-0/.tox/py27-dev/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/builds/project-0/.tox/py27-dev/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send
timeout=timeout
File "/builds/project-0/.tox/py27-dev/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File "/builds/project-0/.tox/py27-dev/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 992, in create_environment
download=download,
File "/usr/lib/python3/dist-packages/virtualenv.py", line 922, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 817, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /builds/project-0/.tox/py27-dev/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 2
Running virtualenv with interpreter /usr/bin/python2.7
ERROR: InvocationError: /usr/bin/python3 -m virtualenv --python /usr/bin/python2.7 py27-dev (see /builds/project-0/.tox/py27-dev/log/py27-dev-0.log)
___________________________________ summary ____________________________________
ERROR: py27-dev: InvocationError: /usr/bin/python3 -m virtualenv --python /usr/bin/python2.7 py27-dev (see /builds/project-0/.tox/py27-dev/log/py27-dev-0.log)
Running after script...
ERROR: Job failed: exit code 1
FATAL: exit code 1
```
Tox uses python3 to create the virtualenv like this:
```
ERROR: py27-dev: InvocationError: /usr/bin/python3 -m virtualenv --python /usr/bin/python2.7 py27-dev (see /builds/project-0/.tox/py27-dev/log/py27-dev-0.log)
```
So either tox needs to use python2 or the test setup needs to get python3 compliant. Don't know how to do this unfortunatly.0.10.3meskiomeskiohttps://0xacab.org/leap/bitmask-dev/-/issues/9187explore the possible frameworks and langs for the systray2018-01-23T21:09:19Zmeskioexplore the possible frameworks and langs for the systrayShould we use golang? rust? python?
Qt? something more native?
https://github.com/getlantern/systray
https://github.com/qdot/systray-rsShould we use golang? rust? python?
Qt? something more native?
https://github.com/getlantern/systray
https://github.com/qdot/systray-rsRiseupVPN betameskiomeskiohttps://0xacab.org/leap/bitmask-dev/-/issues/9319build OSX dmg in the CI2019-01-30T18:58:42Zmeskiobuild OSX dmg in the CII guess we should do it with our infra, but we could also explore using travis (#9092).I guess we should do it with our infra, but we could also explore using travis (#9092).RiseupVPN 19.02Kali KanekoKali Kanekohttps://0xacab.org/leap/bitmask-dev/-/issues/9323First version of a Windows bitmask helper2018-07-03T18:28:04ZKali KanekoFirst version of a Windows bitmask helperThis helper needs to:
* [ ] start openvpn (as admin, drop privileges).
* [ ] stop openvpn
* [ ] register a callback to notify bitmaskd when openvpn dies unexpectedly.This helper needs to:
* [ ] start openvpn (as admin, drop privileges).
* [ ] stop openvpn
* [ ] register a callback to notify bitmaskd when openvpn dies unexpectedly.RiseupVPN betameskiomeskio