fbmessenger

package
v3.18.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

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

View Source
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

This section is empty.

Functions

func NewExperimentMeasurer

func NewExperimentMeasurer(config Config) model.ExperimentMeasurer

NewExperimentMeasurer creates a new ExperimentMeasurer.

Types

type Config

type Config struct{}

Config contains the experiment config.

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

func (m Measurer) ExperimentName() string

ExperimentName implements ExperimentMeasurer.ExperimentName

func (Measurer) ExperimentVersion

func (m Measurer) ExperimentVersion() string

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, args *model.ExperimentArgs) error

Run implements ExperimentMeasurer.Run

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.

Note that this structure is part of the ABI contract with ooniprobe therefore we should be careful when changing it.

type TestKeys

type TestKeys struct {
	urlgetter.TestKeys
	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"`
}

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) Update

func (tk *TestKeys) Update(v urlgetter.MultiOutput)

Update updates the TestKeys using the given MultiOutput result.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL