Skip to content

Commit

Permalink
modify openvpn nettest specification to conform to df-009-tunnel (#295)
Browse files Browse the repository at this point in the history
## Checklist

- [x] I have read the [contribution
guidelines](https://github.com/ooni/spec/blob/master/CONTRIBUTING.md)
- [x] reference issue for this pull request:
ooni/probe#2758
- [ ] related ooni/probe-cli pull request: <!-- add URL here -->
- [x] If I changed a spec, I also bumped its version number and/or date


## Description

Modify spec to comply with the semantics of df-009-tunnel
  • Loading branch information
ainghazal committed Jul 19, 2024
1 parent 5946b96 commit a655d01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion data-formats/df-009-tunnel.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ used. Omit or set to `null` if no SOCKS proxy is being used. The format
to be used is `1.2.3.4:54321` for IPv4 and `[::1234]:54321` for IPv6.

- `tunnel` (`string`; optional): not provided if there is no tunnel, otherwise
one of `"psiphon"` or `"tor"` when there is a tunnel.
one of `"psiphon"`, `"tor"` or `"openvpn"` when there is a tunnel.

## Example

Expand Down
28 changes: 21 additions & 7 deletions nettests/ts-040-openvpn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Specification version number

2024-06-03
2024-07-03

* _status_: experimental.

Expand Down Expand Up @@ -103,6 +103,8 @@ We include data from the following parent formats:

- `df-008-netevents`: for the `network_events` array.

- `df-009-tunnel`: defines `tunnel` to be `openvpn`; it also specifies the semantics of `bootstrap_time`.

## Semantics

These are the expected `test_keys` in the output measurement (arrays have been
Expand All @@ -112,9 +114,12 @@ abbreviated for clarity):
```JavaScript
"test_keys": {
"success": true,
"openvpn_handshake": [...]
"tcp_connect": [...]
"network_events": [...]
"openvpn_handshake": [...],
"tcp_connect": [...],
"network_events": [...],
"bootstrap_time": 0.16,
"tunnel": "openvpn",
"failure": null
}
```

Expand All @@ -131,16 +136,25 @@ Where:
OpenVPN handshake, conforming to `df-008-netevents`. As in the case above,
`transaction_id` contains an index that allows to reference
events with the handshakes in the `openvpn_handshake` array. Do note that
timing information is relative to the beginning of each handshake.
timing information is relative to the beginning of each handshake. Also, for the time being,
the events in this array are pertaining exclusively to the openvpn handshake - this
might change after the experiment evolves to include other network activity using the
tunnel.

- `bootstrap_time` (`float`): number of seconds it took to bootstrap the tunnel. As defined by `df-009-tunnel` data format. If the openvpn tunnel fails to bootstrap, this field is set to 0.

- `failure` (`string`; nullable); if there was an error, this field is a string indicating the error, otherwise it MUST be null. Note that this field is also defined by other specifications. When there is an error in bootstrapping the tunnel, bootstrap_time is present and set to zero. As defined by `df-009-tunnel` data format.

- `tunnel` (`string`); defined to be `openvpn` for this experiment. According to `df-009-tunnel`.

### openvpn_handshake

The `openvpn_handshake` entry contains information about the result of every
openvpn connection attempt performed during the experiment:

- `bootstrap_time` (`float`): the total time until successful handshake or
- `handshake_time` (`float`): the total time until successful handshake or
failure, relative to the beginning of the handshake (`t - t0`). Do note that,
for TCP, the effective time should include the time for the TCP connection.
for TCP, the effective time should exclude the time for the TCP connection.

- `endpoint` (`string`): a URI representing the probed endpoint. This is a different encoding than the input URI format.

Expand Down

0 comments on commit a655d01

Please sign in to comment.