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 EipService ¶
type EipService struct {
Gateways []GatewayV3
}
EipService main json object of eip-service.json
func DecodeEIP3 ¶
func DecodeEIP3(body string) (*EipService, error)
DecodeEIP3 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 struct {
Transport []TransportV3
}
Host string
IPAddress string `json:"ip_address"`
}
GatewayV3 json obj Version 3
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
func (Measurer) GetSummaryKeys ¶
func (m Measurer) GetSummaryKeys(measurement *model.Measurement) (interface{}, error)
GetSummaryKeys implements model.ExperimentMeasurer.GetSummaryKeys.
func (Measurer) Run ¶
func (m Measurer) Run(ctx context.Context, sess model.ExperimentSession, measurement *model.Measurement, callbacks model.ExperimentCallbacks) error
Run implements ExperimentMeasurer.Run
type SummaryKeys ¶
type SummaryKeys struct {
APIBlocked bool `json:"api_blocked"`
ValidCACert bool `json:"valid_ca_cert"`
FailingGateways int `json:"failing_gateways"`
IsAnomaly bool `json:"-"`
}
SummaryKeys contains summary keys for this experiment.
Note that this structure is part of the ABI contract with probe-cli therefore we should be careful when changing it.
type TestKeys ¶
type TestKeys struct {
urlgetter.TestKeys
APIFailure *string `json:"api_failure"`
APIStatus string `json:"api_status"`
CACertStatus bool `json:"ca_cert_status"`
FailingGateways []GatewayConnection `json:"failing_gateways"`
}
TestKeys contains riseupvpn test keys.
func (*TestKeys) AddCACertFetchTestKeys ¶
AddCACertFetchTestKeys Adding 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.
func (*TestKeys) UpdateProviderAPITestKeys ¶
func (tk *TestKeys) UpdateProviderAPITestKeys(v urlgetter.MultiOutput)
UpdateProviderAPITestKeys updates the TestKeys using the given MultiOutput result.