HomePhabricator

move netmapper processing to common VCL

Authored by BBlack.

Description

move netmapper processing to common VCL

This moves the netmapper "carriers" and "proxies" database lookups
to common VCL across all clusters, and integrates them with the
early vcl_recv IP processing done there to generate a standard set
of headers related to client IPs, trusted proxies, carriers, etc.

Note that new header names were invented here for the netmapper
results: "X-Carrier" contains MCC-MNC, and "X-Carrier-Meta"
contains the zeronet metadata like "wap". Combined, these are
what what Zero calls "X-CS2". "X-Trusted-Proxy" also contains
what Zero has traditionally calls "X-Forwarded-By".

This allows for an easier transition of the zero.inc.vcl code to
use the headers supplied from the common VCL, which copies the
data to its legacy headers and then possibly further
manipulates/uses/deletes those legacy headers.

Doing that also removes any fears about the sudden appearance of
previously mobile/zero -specific headers in text/upload requests
causing issues at the MediaWiki layer.

Bug: T89177
Bug: T96847
Bug: T109286
Change-Id: Ib92353d478c06548c4082af970f4561f2c6332f3

Details

Committed
BBlackOct 6 2015, 5:40 AM
Parents
rOPUPf69c342953a8: tools: Remove ensure => absents
Branches
Unknown
Tags
Unknown
ChangeId
Ib92353d478c06548c4082af970f4561f2c6332f3