Documentation ¶
Overview ¶
Package riseupvpn contains the RiseupVPN network experiment.
See https://github.com/ooni/spec/blob/master/nettests/ts-026-riseupvpn.md
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExperimentMeasurer ¶
func NewExperimentMeasurer(config Config) model.ExperimentMeasurer
NewExperimentMeasurer creates a new ExperimentMeasurer.
Types ¶
type CapabilitiesV3 ¶ added in v3.19.0
type CapabilitiesV3 struct {
Transport []TransportV3
}
CapabilitiesV3 is a list of transports a gateway supports
type EIPServiceV3 ¶ added in v3.19.0
type EIPServiceV3 struct {
Gateways []GatewayV3
}
EIPServiceV3 is the main JSON object returned by eip-service.json.
func DecodeEIPServiceV3 ¶ added in v3.19.0
func DecodeEIPServiceV3(body string) (*EIPServiceV3, error)
DecodeEIPServiceV3 decodes eip-service.json version 3
type GatewayConnection ¶
type GatewayConnection struct { IP string `json:"ip"` Port int `json:"port"` TransportType string `json:"transport_type"` }
GatewayConnection describes the connection to a riseupvpn gateway.
type GatewayV3 ¶
type GatewayV3 struct { Capabilities CapabilitiesV3 Host string IPAddress string `json:"ip_address"` }
GatewayV3 describes a gateway.
type Measurer ¶
type Measurer struct { // Config contains the experiment settings. If empty we // will be using default settings. Config Config // Getter is an optional getter to be used for testing. Getter urlgetter.MultiGetter }
Measurer performs the measurement.
func (Measurer) ExperimentName ¶
ExperimentName implements ExperimentMeasurer.ExperimentName.
func (Measurer) ExperimentVersion ¶
ExperimentVersion implements ExperimentMeasurer.ExperimentVersion.
type TestKeys ¶
type TestKeys struct { urlgetter.TestKeys APIFailures []string `json:"api_failures"` CACertStatus bool `json:"ca_cert_status"` }
TestKeys contains riseupvpn test keys.
func (*TestKeys) AddCACertFetchTestKeys ¶
AddCACertFetchTestKeys adds generic urlgetter.Get() testKeys to riseupvpn specific test keys
func (*TestKeys) AddGatewayConnectTestKeys ¶
func (tk *TestKeys) AddGatewayConnectTestKeys(v urlgetter.MultiOutput, transportType string)
AddGatewayConnectTestKeys updates the TestKeys using the given MultiOutput result of gateway connectivity testing. Sets TransportStatus to "ok" if any successful TCP connection could be made
func (*TestKeys) UpdateProviderAPITestKeys ¶
func (tk *TestKeys) UpdateProviderAPITestKeys(v urlgetter.MultiOutput)
UpdateProviderAPITestKeys updates the TestKeys using the given MultiOutput result.