riseup-vpn does not build o Arch Linux
Hey,
The AUR riseup-vpn package on Arch Linux fails to build. It tries to build version 0.21.11. The tests fail because the port/certificate/ca changed.
This is how it is build: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=riseup-vpn
I fixed the tests with these changes:
diff --git a/pkg/snowflake/bootstrap.go b/pkg/snowflake/bootstrap.go
index 0f370fa..55aa33c 100644
--- a/pkg/snowflake/bootstrap.go
+++ b/pkg/snowflake/bootstrap.go
@@ -79,6 +79,8 @@ func BootstrapWithSnowflakeProxies() error {
}
// XXX parametrize these urls
+ //fetchFile(apiClient, "https://api.black.riseup.net:4430/3/config/eip-service.json")
+ //fetchFile(apiClient, "https://api.black.riseup.net:4430/3/cert")
fetchFile(apiClient, "https://api.black.riseup.net/3/config/eip-service.json")
fetchFile(apiClient, "https://api.black.riseup.net/3/cert")
diff --git a/pkg/vpn/bonafide/bonafide_api_test.go b/pkg/vpn/bonafide/bonafide_api_test.go
index ec323d3..76134cd 100644
--- a/pkg/vpn/bonafide/bonafide_api_test.go
+++ b/pkg/vpn/bonafide/bonafide_api_test.go
@@ -18,7 +18,7 @@ func TestBonafideAPI(t *testing.T) {
}
func initTestConfig() {
- config.APIURL = "https://api.black.riseup.net/"
+ config.APIURL = "https://api.black.riseup.net:4430/"
config.GeolocationAPI = "https://api.black.riseup.net:9001/json"
config.CaCert = []byte(`-----BEGIN CERTIFICATE-----
MIIFjTCCA3WgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBZMRgwFgYDVQQKDA9SaXNl
@@ -51,5 +51,15 @@ tsK3pwE0FEqGnT4qMFbixQmc8bGyuakr23wjMvfO7eZUxBuWYR2SkcP26sozF9PF
tGhbZHQVGZUTVPyvwahMUEhbPGVerOW0IYpxkm0x/eaWdTc4vPpf/rIlgbAjarnJ
UN9SaWRlWKSdP4haujnzCoJbM7dU9bjvlGZNyXEekgeT0W2qFeGGp+yyUWw8tNsp
0BuC1b7uW/bBn/xKm319wXVDvBgZgcktMolak39V7DVO
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIBYjCCAQigAwIBAgIBATAKBggqhkjOPQQDAjAXMRUwEwYDVQQDEwxMRUFQIFJv
+b3QgQ0EwHhcNMjExMTAyMTkwNTM3WhcNMjYxMTAyMTkxMDM3WjAXMRUwEwYDVQQD
+EwxMRUFQIFJvb3QgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQxOXBGu+gf
+pjHzVteGTWL6XnFxtEnKMFpKaJkA/VOHmESzoLsZRQxt88GssxaqC01J17idQiqv
+zgNpedmtvFtyo0UwQzAOBgNVHQ8BAf8EBAMCAqQwEgYDVR0TAQH/BAgwBgEB/wIB
+ATAdBgNVHQ4EFgQUZdoUlJrCIUNFrpffAq+LQjnwEz4wCgYIKoZIzj0EAwIDSAAw
+RQIgfr3w4tnRG+NdI3LsGPlsRktGK20xHTzsB3orB0yC6cICIQCB+/9y8nmSStfN
+VUMUyk2hNd7/kC8nL222TTD7VZUtsg==
-----END CERTIFICATE-----`)
}
Using the current main branch, the tests run without an issue. Now I'm confused because the tests on main still use port 443 (now we use 4430 I think?), but they don't fail...?
pea@peabox:bitmask-vpn rg black.riseup
vendor/0xacab.org/leap/obfsvpn/Makefile
5: curl -k https://black.riseup.net/ca.crt > /tmp/ca.crt
6: curl -k https://api.black.riseup.net/3/cert > /tmp/cert.pem
pkg/vpn/bonafide/bonafide_test.go
51: if strings.Contains(url, "api.black.riseup.net:9001/json") {
pkg/vpn/bonafide/bonafide_api_test.go
21: config.APIURL = "https://api.black.riseup.net/"
22: config.GeolocationAPI = "https://api.black.riseup.net:9001/json"
tests/ciphersuites/Makefile
6: /usr/bin/curl -k https://black.riseup.net/ca.crt > /tmp/ca.crt
7: /usr/bin/curl -k https://api.black.riseup.net/3/cert > /tmp/cert.pem
gui/providers/providers.json
15: "apiURL": "https://api.black.riseup.net/",
16: "geolocationAPI": "https://api.black.riseup.net:9001/json",
providers/vendor.conf
13:apiURL = https://api.black.riseup.net/
14:caURL = https://black.riseup.net/ca.crt
20:geolocationAPI = https://api.black.riseup.net:9001/json
58:geolocationAPI = https://api.black.riseup.net:9001/json
docs/design/gateway-selection.rst
22: curl -k https://api.black.riseup.net:9001/json
pea@peabox:bitmask-vpn
I need some advice....
Edited by Pea Nut