Skip to content

A Firefox shield study to recommend using VPN to users who would benefit from it.

Notifications You must be signed in to change notification settings

raymak/vpn-recommendation-shield-study

Repository files navigation

VPN Recommender Shield Study

This extension is a Firefox SHIELD Study that recommends a VPN solution to users who may benefit from it.

Build the extension

Note: this step is optional, you can download a recent version of the zip here (private URL).

npm install
npm run build

The extension zip file can then be found in the /dist folder.

Run the tests

npm test

Run the extension

This extension contains privileged code as WebExtension APIs and therefore can only be run in Firefox Nightly or Dev edition.

To run the extension in the command line

Use the following command to randomly get into one of the branches npm start

If you want a specific branch, run: npm run branch:[BRANCH_NAME]

For instance, to run the captive-portal branch, you can use: npm run branch:captive-portal

See the list of branch names below.

To run the extension in the browser:

  1. Download the extension zip file
  2. Open Firefox Nightly
  3. Set your desired branch if you want to (see next section), otherwise you will randomly get into one of the branches
  4. Go to about:debugging
  5. Click on "Load Temporary Add-on..."
  6. Select the extension zip file
To set the branch (should be done before loading the study extension):
  1. Go to about:config
  2. Click on "I accept the risk!"
  3. Right click and select "New -> String" form the context menu
  4. Create the "extensions.vpn-recommendation-study-1_shield_mozilla_org.test.variationName" pref
  5. Set the value to the desired branch name (see the list of branch names below)
Branch names
  • captive-portal: triggered when you connect to a public (unencrypted) wifi network with a captive portal page
  • privacy-hostname: triggered when you visit websites, examples include disconnect.me and strongvpn.com
  • control: no notifications are shown
  • catch-all: triggered after you use Firefox for a while
  • streaming-hostname: triggered when you visit websites, examples include hulu.com and netflix.com

Faking the captive portal trigger

In case you would like to test the captive-portal branch without actually finding a public wifi network, follow the instructions below after installing the extension:

  1. Go to about:debugging
  2. Check the "Enable add-on debugging" checkbox
  3. Click on the "Debug" button right below the extension name
  4. Go to the "Console" section
  5. Enter browser.experiments.vpnRecommender.fakeCaptivePortal()
  6. You should now see the recommendation if you are in the captive-portal branch

About

A Firefox shield study to recommend using VPN to users who would benefit from it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages