From c8370774c60f4be7538a41854a87f664c23c3e6e Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 18 Oct 2023 17:59:05 +0200 Subject: [PATCH 1/4] fix: make riseupvpn an experimental nettest Reference issue: https://github.com/ooni/probe/issues/2576 Specifically: 1. make sure the nettest runs (see issue to see how); 2. make sure it runs as experimental (i.e., gray); 3. make sure the results look like experimental results. --- CHANGELOG.md | 2 +- main/utils/ooni/run.js | 1 - .../measurement/MeasurementContainer.js | 2 - .../nettests/circumvention/RiseupVPN.js | 136 ------------------ renderer/components/nettests/index.js | 4 +- 5 files changed, 2 insertions(+), 143 deletions(-) delete mode 100644 renderer/components/nettests/circumvention/RiseupVPN.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ec665bf..8e961711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,7 +62,7 @@ probe-cli: 3.9.2 - Updated dependencies: `ooni-components`, `styled-components`, `rebass` - Pin to `styled-components@v5.1.1` because 5.2.x introduces this bug: styled-components/styled-components#3273 - Use `Modal` component from `ooni-components` instead of the forked one in the repo. -- Moved icons for Signal and RiseupVPN tests to `ooni-comopnents` +- Moved icons for Signal and RiseupVPN tests to `ooni-components` ### Removed diff --git a/main/utils/ooni/run.js b/main/utils/ooni/run.js index a2bc2606..1d4872ed 100644 --- a/main/utils/ooni/run.js +++ b/main/utils/ooni/run.js @@ -18,7 +18,6 @@ class Runner { } catch (e) { log.debug(`Failed to find a running ooniprobe process to kill. code: ${e.code}`) } - } run() { diff --git a/renderer/components/measurement/MeasurementContainer.js b/renderer/components/measurement/MeasurementContainer.js index 2fe7ead2..a5caa14b 100644 --- a/renderer/components/measurement/MeasurementContainer.js +++ b/renderer/components/measurement/MeasurementContainer.js @@ -26,7 +26,6 @@ import { NDT } from '../nettests/performance/NDT' import { Dash } from '../nettests/performance/Dash' import { Psiphon } from '../nettests/circumvention/Psiphon' import { Tor } from '../nettests/circumvention/Tor' -import { RiseupVPN } from '../nettests/circumvention/RiseupVPN' import { Signal } from '../nettests/im/Signal' import FullHeightFlex from '../FullHeightFlex' @@ -48,7 +47,6 @@ const detailsMap = { dash: Dash, psiphon: Psiphon, tor: Tor, - riseupvpn: RiseupVPN, signal: Signal, } diff --git a/renderer/components/nettests/circumvention/RiseupVPN.js b/renderer/components/nettests/circumvention/RiseupVPN.js deleted file mode 100644 index 593d07da..00000000 --- a/renderer/components/nettests/circumvention/RiseupVPN.js +++ /dev/null @@ -1,136 +0,0 @@ -import React, { useMemo } from 'react' -import PropTypes from 'prop-types' -import { FormattedMessage } from 'react-intl' -import { Flex, Box, Text } from 'ooni-components' -import { NettestRiseupVPN } from 'ooni-components/dist/icons' - -import colorMap from '../../colorMap' -import FormattedMarkdownMessage from '../../FormattedMarkdownMessage' -import StatusBox from '../../measurement/StatusBox' - -const Status = ({ count }) => { - if (typeof count !== 'number' ) { - return null - } - if (count === 0) { - return - } else if (count > 1) { - return - } else { - return - } -} - -const RiseupVPN = ({measurement, isAnomaly, render, rawData}) => { - const testKeys = JSON.parse(measurement.test_keys) - let apiStatus = 'Okay' - let apiLabel = null - - if (testKeys['api_blocked'] || !testKeys['valid_ca_cert']) { - apiStatus = 'Blocked' - apiLabel = - } else { - apiLabel = - } - - const heroTitle = isAnomaly ? ( - - ) : ( - - ) - - const data = useMemo(() => { - let openVPNGatewayLabel = null - let bridgedGatewayLabel = null - let failedOpenVPNGateways = 0 - let failedBridgeGateways = 0 - - if (rawData) { - const failingGateways = rawData?.test_keys?.failing_gateways - if (failingGateways && Array.isArray(failingGateways)) { - for (const gateway of failingGateways) { - const { transport_type = '' } = gateway - if (transport_type === 'openvpn') { - failedOpenVPNGateways++ - } else if (transport_type === 'obfs4') { - failedBridgeGateways++ - } - } - } - return { - openVPNGatewayLabel, - bridgedGatewayLabel, - failedOpenVPNGateways, - failedBridgeGateways - } - } - return null - }, [rawData]) /* eslint-disable-line react-hooks/exhaustive-deps */ - - const RiseupVPNDetails = () => { - return( - - - - {isAnomaly ? ( - - ) : ( - - )} - - - {data && - - - } - value={apiLabel} - ok={apiStatus !== 'Blocked'} - /> - - - } - value={} - ok={data.failedOpenVPNGateways === 0} - /> - - - } - value={} - ok={data.failedBridgeGateways === 0} - /> - - - } - - ) - } - - return ( -
- {render({ - heroTitle: heroTitle, - heroBG: isAnomaly ? colorMap.blocked : colorMap.reachable, - details: - })} -
- ) -} - -RiseupVPN.propTypes = { - measurement: PropTypes.object, - isAnomaly: PropTypes.bool, - render: PropTypes.func, - rawData: PropTypes.object -} - -export { RiseupVPN } - -// Metadata for the nettest -export default { - name: , - icon: , - methodology: 'https://ooni.org/nettest/riseupvpn/' -} diff --git a/renderer/components/nettests/index.js b/renderer/components/nettests/index.js index 88129dfe..68868e80 100644 --- a/renderer/components/nettests/index.js +++ b/renderer/components/nettests/index.js @@ -23,7 +23,6 @@ import ndt from './performance/NDT' import dash from './performance/Dash' import psiphon from './circumvention/Psiphon' import tor from './circumvention/Tor' -import riseupvpn from './circumvention/RiseupVPN' import signal from './im/Signal' import { default as animation } from '../../public/static/animations/loadingTests.json' @@ -71,7 +70,7 @@ export const tests = { dash, psiphon, tor, - riseupvpn, + riseupvpn: minimalTest('riseupvpn'), signal, stunreachability: minimalTest('stunreachability'), dnscheck: minimalTest('dnscheck'), @@ -105,6 +104,5 @@ export const cliTestKeysToGroups = { 'nettests.NDT': 'performance', 'nettests.Psiphon': 'circumvention', 'nettests.Tor': 'circumvention', - 'nettests.RiseupVPN': 'circumvention', 'nettests.Signal': 'im', } From c29c52234bc3c59658ebd7d1b66a08b96487fe48 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 18 Oct 2023 18:00:23 +0200 Subject: [PATCH 2/4] chore: use ooni/probe-cli@v3.19.0-alpha.4 This is the latest alpha release as of this writing and contains the necessary code to run riseupvpn as a default-disable experimental nettest. As documented by https://github.com/ooni/probe/issues/2576, this release also has an issue when running that we'll fix on the probe-cli side as soon as possible. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f472487d..47d6b96c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Open Observatory of Network Interference (OONI) ", "productName": "OONI Probe", "version": "3.9.1", - "probeVersion": "3.17.5", + "probeVersion": "3.19.0-alpha.4", "main": "main/index.js", "license": "BSD-3-Clause", "repository": "ooni/probe-desktop", From cc3ce6e18dc5ea2dfed9c4b949b5f9afa74bb673 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 18 Oct 2023 19:34:51 +0200 Subject: [PATCH 3/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 47d6b96c..3ca54b40 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Open Observatory of Network Interference (OONI) ", "productName": "OONI Probe", "version": "3.9.1", - "probeVersion": "3.19.0-alpha.4", + "probeVersion": "3.19.0-alpha.5", "main": "main/index.js", "license": "BSD-3-Clause", "repository": "ooni/probe-desktop", From 48246e366377197ceec32f1c20c73153abaab174 Mon Sep 17 00:00:00 2001 From: majakomel Date: Wed, 22 Nov 2023 10:22:10 +0100 Subject: [PATCH 4/4] Bump probe to 3.19.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ca54b40..4aac518f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Open Observatory of Network Interference (OONI) ", "productName": "OONI Probe", "version": "3.9.1", - "probeVersion": "3.19.0-alpha.5", + "probeVersion": "3.19.1", "main": "main/index.js", "license": "BSD-3-Clause", "repository": "ooni/probe-desktop",