enable setting introducer url using env variable
check if the LEAP_INTRODUCER_URL env variable is non-empty and use its value as introducer URL
this allows us to test the introducer feature in the client
Merge request reports
Activity
requested review from @peanut2
- Resolved by Pea Nut
Hey,
Have you tested this? I had some issues and pushed some fixes:
When running with
LEAP_INTRODUCER_URL="obfsvpnintro://localhost:4430/?cert=MpRqHUJtZuL1ZUB3agXPGJJ0aZTIc20N5haBkAllf2CaTnaWOAtJGfUCgv0XCOJzt1qpfQ&fqdn=localhost&kcp=0"
I got:2024-10-16T08:41:34+02:00 DBG failed to create http client from introducer error="expected a FQDN, got: localhost"
This was fixed in bitmask-core, so I updated the dependency.
Then I needed to fix the recent API changes in DoGeolocationLookup. It now only returns an error. Before also a string was returned.
Then, when I tried, I got:
2024-10-16T08:54:55+02:00 WRN Could not update lastUsed timestamp for introducer error="introducer not found"
So we need to add the introducer to the database first. How do we want to handle this?
We could runLet me think about this againstorage.AddIntroducer(url)
, but this part is currently only used/encapsulated in bitmaks-core. Also we need to remove it from the database after the run. So it's not super simple. What do you think?Edited by Pea NutSo we need to add the introducer to the database first. How do we want to handle this?
We could runLet me think about this againstorage.AddIntroducer(url)
, but this part is currently only used/encapsulated in bitmaks-core. Also we need to remove it from the database after the run. So it's not super simple. What do you think?i think this belongs in
bitmask-core
itself, when it tries to update thelastUsed
timestamp if it doesn't find a introducer it can simply add it to the storage, iirc this was the behavior before in bitmask-core when using the earlier version of the storage mechanismHm, I like to be explicit and keep it the way it currently is: add, use it and remove introducer (from storage layer). What do you say @cyberta
I don't have a strong opinion on that. Either works, I have a slight preference for keeping add and update as different actions. Explicitly adding an introducer makes it maybe easier to follow the code? There are some other code changes in the pipeline regarding the storage layer to avoid implicit initialization of it (bitmask-core#24). Having distinct actions add, update and remove seems to fit in that context.
I now have a working version that I'm happy with. @jkito can you review please? I use this go.work:
go 1.22.2 use ( . ../bitmask-core )
There, I'm on
origin/fix-29
which fixes some introducerURL things. To test, I useexport LEAP_INTRODUCER_URL="obfsvpnintro://localhost:4430/?cert=HtqKzIacN3%2Ba6AAS%2BXlnw%2FlEgHRLIm%2BmEFtIgFQ26vxWa4aFy07XhWIRjK6kZ1YpxejkRA&fqdn=localhost&kcp=0&auth=123"
(Don't forget to url encode). If you have problems with the test setup, just ask.
added 5 commits
Toggle commit listassigned to @peanut2
There are more things to fix. Now we have a version that works (most of the time) with v5. But there is still a database issue. And a corner case bug:
2024-10-16T10:27:55+02:00 TRC Checking for a valid OpenVPN client credentials (key and certificate) path=/tmp/leap-566310687/openvpn.pem 2024-10-16T10:27:55+02:00 WRN Could not decode pem data data="404 page not found\n" T 127.0.0.1:41124 -> 127.0.0.1:8443 [AP] #774 GET /api/5/openvpn/cert HTTP/1.1. Host: localhost:8443. User-Agent: Go-http-client/1.1. Accept: application/json. Accept-Encoding: gzip. . T 127.0.0.1:8443 -> 127.0.0.1:41124 [AP] #776 HTTP/1.1 200 OK. Cache-Control: no-cache. Content-Type: text/plain; charset=UTF-8. Date: Wed, 16 Oct 2024 08:27:55 GMT. Content-Length: 19. . 404 page not found
Don't know why/when this happens
It's "just" a RiseUp problem. I described it here: menshen#60 (comment 1223051)
changed milestone to %2025.02 LEAP VPN Release
mentioned in issue #897 (closed)
mentioned in merge request bitmask-core!34 (merged)
added 21 commits
- 776d7e95...d8337b7f - 11 earlier commits
- e11ac2fd - change obfsvpn version to v1.1.0
- 9a04b348 - helper: use unix socket for local api
- 95a5862d - create 0.24.10-rc.1 release and update CHANGELOG
- aec8c140 - chore: replace ioutil with io module
- 8d19435d - enable setting introducer url using env variable
- 16f3183d - Update to latest bitmask-core (commit 0812b9aadf98)
- 86ae330f - Update calls to DoGeolocationLookup after API change
- b8a689ea - Improve error handling when checking downloaded pem cert
- bc565825 - Initialize and close bitmask-core storage
- 31b6f2e4 - DEV: Add introducer to storage if not yet happened
Toggle commit listmentioned in issue bitmask-core#22 (closed)
@peanut2 could you please resolve merge conflicts and rebase it on main
added 21 commits
-
31b6f2e4...91a2ce8d - 13 commits from branch
main
- 4815ff5e - Strip port of menshen host before resolving with logDnsLookup
- 4e8ddf2e - chore: replace ioutil with io module
- ffe8da8b - enable setting introducer url using env variable
- 9b26ea17 - Update to latest bitmask-core (commit 0812b9aadf98)
- fbc0feaa - Update calls to DoGeolocationLookup after API change
- 072ed564 - Improve error handling when checking downloaded pem cert
- f4e62a17 - Initialize and close bitmask-core storage
- 3a8aaf52 - DEV: Add introducer to storage if not yet happened
Toggle commit list-
31b6f2e4...91a2ce8d - 13 commits from branch
added 1 commit
- 09c9d39b - Add introducer to storage before using it when supplied via env
- Resolved by jkito
- Resolved by jkito
added 11 commits
-
09c9d39b...82cc49bb - 3 commits from branch
main
- dc1d5ada - Strip port of menshen host before resolving with logDnsLookup
- b53473e6 - chore: replace ioutil with io module
- 3f63e043 - enable setting introducer url using env variable
- 07da5efd - Update to latest bitmask-core (commit 0812b9aadf98)
- 132dc10e - Update calls to DoGeolocationLookup after API change
- c4836287 - Improve error handling when checking downloaded pem cert
- e51b45c7 - Initialize and close bitmask-core storage
- c8a05473 - Add introducer to storage before using it when supplied via env
Toggle commit list-
09c9d39b...82cc49bb - 3 commits from branch
- Resolved by Pea Nut
added 9 commits
-
e3c92310 - 1 commit from branch
main
- dd29081b - Strip port of menshen host before resolving with logDnsLookup
- 685cb3c9 - chore: replace ioutil with io module
- 0654238c - enable setting introducer url using env variable
- 466c1b6b - Update to latest bitmask-core (commit 0812b9aadf98)
- 343288d0 - Update calls to DoGeolocationLookup after API change
- 767a99a7 - Improve error handling when checking downloaded pem cert
- 46394fa8 - Initialize and close bitmask-core storage
- 0c50e899 - Add introducer to storage before using it when supplied via env
Toggle commit list-
e3c92310 - 1 commit from branch
added 6 commits
- 0bd196e7 - enable setting introducer url using env variable
- 1f2cd70d - Update to latest bitmask-core (commit 0812b9aadf98)
- 1f91f6f8 - Update calls to DoGeolocationLookup after API change
- c6bca076 - Improve error handling when checking downloaded pem cert
- 1a5a5a07 - Initialize and close bitmask-core storage
- de44d07f - Add introducer to storage before using it when supplied via env
Toggle commit listenabled an automatic merge when all merge checks for de44d07f pass