Documentation
¶
Overview ¶
Package fbmessenger contains the Facebook Messenger network experiment.
See https://github.com/ooni/spec/blob/master/nettests/ts-019-facebook-messenger.md
Index ¶
Constants ¶
const ( // FacebookASN is Facebook's ASN FacebookASN = 32934 // ServiceSTUN is the STUN service ServiceSTUN = "dnslookup://stun.fbsbx.com" // ServiceBAPI is the b-api service ServiceBAPI = "tcpconnect://b-api.facebook.com:443" // ServiceBGraph is the b-graph service ServiceBGraph = "tcpconnect://b-graph.facebook.com:443" // ServiceEdge is the edge service ServiceEdge = "tcpconnect://edge-mqtt.facebook.com:443" // ServiceExternalCDN is the external CDN service ServiceExternalCDN = "tcpconnect://external.xx.fbcdn.net:443" // ServiceScontentCDN is the scontent CDN service ServiceScontentCDN = "tcpconnect://scontent.xx.fbcdn.net:443" // ServiceStar is the star service ServiceStar = "tcpconnect://star.c10r.facebook.com:443" )
Variables ¶
var ( // ErrInputRequired indicates that no richer-input target was provided. ErrInputRequired = targetloading.ErrInputRequired // ErrInvalidInputType indicates that the richer-input target has the wrong type. ErrInvalidInputType = targetloading.ErrInvalidInputType )
var Services = []string{ ServiceSTUN, ServiceBAPI, ServiceBGraph, ServiceEdge, ServiceExternalCDN, ServiceScontentCDN, ServiceStar, }
Services is the list of services we're testing.
Functions ¶
func NewExperimentMeasurer ¶
func NewExperimentMeasurer() model.ExperimentMeasurer
NewExperimentMeasurer creates a new ExperimentMeasurer.
func NewLoader ¶ added in v0.37.0
func NewLoader(loader *targetloading.Loader, gopts any) model.ExperimentTargetLoader
NewLoader constructs a new model.ExperimentTargetLoader instance.
This function PANICS if options is not an instance of *fbmessenger.Config.
Types ¶
type Analysis ¶ added in v0.26.0
type Analysis struct {
FacebookBAPIDNSConsistent *bool `json:"facebook_b_api_dns_consistent"`
FacebookBAPIReachable *bool `json:"facebook_b_api_reachable"`
FacebookBGraphDNSConsistent *bool `json:"facebook_b_graph_dns_consistent"`
FacebookBGraphReachable *bool `json:"facebook_b_graph_reachable"`
FacebookEdgeDNSConsistent *bool `json:"facebook_edge_dns_consistent"`
FacebookEdgeReachable *bool `json:"facebook_edge_reachable"`
FacebookExternalCDNDNSConsistent *bool `json:"facebook_external_cdn_dns_consistent"`
FacebookExternalCDNReachable *bool `json:"facebook_external_cdn_reachable"`
FacebookScontentCDNDNSConsistent *bool `json:"facebook_scontent_cdn_dns_consistent"`
FacebookScontentCDNReachable *bool `json:"facebook_scontent_cdn_reachable"`
FacebookStarDNSConsistent *bool `json:"facebook_star_dns_consistent"`
FacebookStarReachable *bool `json:"facebook_star_reachable"`
FacebookSTUNDNSConsistent *bool `json:"facebook_stun_dns_consistent"`
FacebookSTUNReachable *bool `json:"facebook_stun_reachable"`
FacebookDNSBlocking *bool `json:"facebook_dns_blocking"`
FacebookTCPBlocking *bool `json:"facebook_tcp_blocking"`
}
Analysis contains the measurement analysis performed by the probe.
type Measurer ¶
type Measurer struct {
// 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 SummaryKeys ¶
type SummaryKeys struct {
DNSBlocking bool `json:"facebook_dns_blocking"`
TCPBlocking bool `json:"facebook_tcp_blocking"`
IsAnomaly bool `json:"-"`
}
SummaryKeys contains summary keys for this experiment.
func (*SummaryKeys) Anomaly ¶ added in v0.28.0
func (sk *SummaryKeys) Anomaly() bool
Anomaly implements model.MeasurementSummary.
type Target ¶ added in v0.37.0
type Target struct {
// Config contains the configuration.
Config *Config
// URL is the input URL.
URL string
}
Target is a richer-input target that this experiment should measure.
func (*Target) Category ¶ added in v0.37.0
Category implements model.ExperimentTarget.
func (*Target) Country ¶ added in v0.37.0
Country implements model.ExperimentTarget.
func (*Target) Input ¶ added in v0.37.0
Input implements model.ExperimentTarget.
func (*Target) Options ¶ added in v0.37.0
Options implements model.ExperimentTarget.
func (*Target) String ¶ added in v0.37.0
String implements model.ExperimentTarget.
type TestKeys ¶
TestKeys contains the experiment results
func (*TestKeys) ComputeEndpointStatus ¶
func (tk *TestKeys) ComputeEndpointStatus(v urlgetter.MultiOutput, dns, tcp **bool)
ComputeEndpointStatus computes the DNS and TCP status of a specific endpoint.
func (*TestKeys) MeasurementSummaryKeys ¶ added in v0.28.0
func (tk *TestKeys) MeasurementSummaryKeys() model.MeasurementSummaryKeys
MeasurementSummaryKeys implements model.MeasurementSummaryKeysProvider.
func (*TestKeys) Update ¶
func (tk *TestKeys) Update(v urlgetter.MultiOutput)
Update updates the TestKeys using the given MultiOutput result.