dhowe / AdNauseam-chrome

A Chrome extension to help defend against surveillance and tracking by ad-networks
19 stars 6 forks source link

RequestHandler #2

Open dhowe opened 9 years ago

dhowe commented 9 years ago

This entity should handle registering, de-registering, and listening for request-related events.

The equivalent events in Firefox are "http-on-modify-request" and "http-on-examine-response".

It needs to be able to read and modify cookies and headers for all requests.

It also needs to be able to distinguish whether requests are generated by ADN; that is, whether they have come from AdNauseam's hidden tab/window.

dhowe commented 9 years ago

The chrome.webRequest API should handle this functionality, specifically the events: onBeforeRequest, onBeforeSendHeaders (for modifying the referer, and handling outgoing cookies), onHeadersReceived (for handling incoming cookies), and onCompleted