Documentation
¶
Overview ¶
Package machine tells an open or click made by software from one made by a person (ADR 0053, GLOSSARY: Machine engagement). A hit is machine when its user-agent belongs to a known crawler or scanner (the crawler-user-agents list, a maintained library) or its address lies inside an iCloud Private Relay egress range, a list Apple publishes and the refresh job keeps in a plain table. Detection is a partial signal: Apple publishes no list for Mail Privacy Protection and the Private Relay list is known to be incomplete. Neither the address nor the user-agent is kept: they are read for the verdict and dropped.
The table holds no Workspace data, so the package holds the raw ent client.
Index ¶
Constants ¶
const RangesURL = "https://mask-api.icloud.com/egress-ip-ranges.csv"
RangesURL is where Apple publishes the Private Relay egress ranges, one CSV row per range (`172.224.224.0/31,GB,GB-LND,London,`).
Variables ¶
var ErrNoRanges = errors.New("machine: the published list holds no range")
ErrNoRanges is a published list that held no range: it never replaces the stored one.
Functions ¶
This section is empty.
Types ¶
type Detector ¶
type Detector struct {
// contains filtered or unexported fields
}
Detector judges a hit and refreshes the ranges it judges by.
type HTTPSource ¶
HTTPSource fetches the list from Apple over HTTPS.
func NewHTTPSource ¶
func NewHTTPSource() HTTPSource
NewHTTPSource is the source of the composition root: Apple's published URL.
func (HTTPSource) Fetch ¶
func (s HTTPSource) Fetch(ctx context.Context) (io.ReadCloser, error)
Fetch implements Source.