|
1 | | -HTTPS Everywhere |
| 1 | +HTTPS Everywhere [](https://travis-ci.org/EFForg/https-everywhere) |
2 | 2 | ================ |
3 | 3 |
|
4 | | -Source Tree |
5 | | ------------ |
| 4 | +Getting Started |
| 5 | +--------------- |
6 | 6 |
|
7 | | -This is the source tree for HTTPS Everywhere for Firefox and Chrome. |
| 7 | +Get the packages you need and install a git hook to run tests before push: |
8 | 8 |
|
9 | | -Important directories you might want to know about |
| 9 | + bash install-dev-dependencies.sh |
10 | 10 |
|
11 | | - src/ The Firefox source |
| 11 | +Run the tests for the Firefox version: |
12 | 12 |
|
13 | | - chromium/ The Chromium/Chrome source |
14 | | - (not to be confused with Firefox browser "chrome" or UI) |
| 13 | + bash test.sh |
15 | 14 |
|
16 | | - src/components | |
17 | | - src/chrome/content | Firefox JavaScript and XUL code |
18 | | - src/chrome/content/code | |
| 15 | +Run the latest code and rulesets in a standalone Firefox profile: |
19 | 16 |
|
20 | | - src/chrome/content/rules The rulesets live here |
| 17 | + bash test.sh --justrun |
| 18 | + |
| 19 | +Run the latest code and rulesets in a standalone Chromium profile: |
21 | 20 |
|
| 21 | + bash run-chromium.sh |
22 | 22 |
|
23 | | -Installing Dependencies in Debian or Ubuntu |
24 | | -------------------------------------------- |
| 23 | +Build the Firefox extension as a .xpi package: |
25 | 24 |
|
26 | | - sudo apt-get install python-lxml python-libxml2 libxml2-utils zip |
| 25 | + bash makexpi.sh |
27 | 26 |
|
28 | | -Installing Dependencies in Mac OS X |
29 | | ------------------------------------ |
| 27 | +Build the Chromium extension as a .crx package: |
30 | 28 |
|
31 | | -We recommend Mac users install dependencies using Homebrew: |
32 | | -http://mxcl.github.io/homebrew/ |
| 29 | + bash makecrx.sh |
33 | 30 |
|
34 | | -Once you have Homebrew and Xcode installed, run this to install HTTPS Everywhere dependencies. |
| 31 | +Both of the build commands store their output under pkg/. |
35 | 32 |
|
36 | | - brew install python libxml2 gnu-sed |
| 33 | +Precommit Testing |
| 34 | +----------------- |
| 35 | + |
| 36 | +One can run the available test suites automatically by enabling the precommit |
| 37 | +hook provided with: |
| 38 | + |
| 39 | + ln -s ../../hooks/precommit .git/hooks/pre-commit |
37 | 40 |
|
38 | | -Homebrew puts python in /usr/local/bin, but the python that comes with OS X is in /usr/bin. In order to use homebrew's version of python and pip you must change the order of your path so that /usr/local/bin comes before /usr/bin. This command will force your path to start with /usr/local/bin: |
| 41 | +Source Tree |
| 42 | +----------- |
39 | 43 |
|
40 | | - echo PATH=/usr/local/bin:$PATH >> ~/.profile |
| 44 | +This is the source tree for HTTPS Everywhere for Firefox and Chrome. |
41 | 45 |
|
42 | | -After running this close your terminal and then open it again. Then install lxml using pip. |
| 46 | +Important directories you might want to know about |
43 | 47 |
|
44 | | - pip install lxml |
| 48 | + src/ The Firefox source |
| 49 | + |
| 50 | + chromium/ The Chromium/Chrome source |
| 51 | + (not to be confused with Firefox browser "chrome" or UI) |
| 52 | + |
| 53 | + src/components | |
| 54 | + src/chrome/content | Firefox JavaScript and XUL code |
| 55 | + src/chrome/content/code | |
| 56 | + |
| 57 | + src/chrome/content/rules The rulesets live here |
45 | 58 |
|
46 | 59 | Hacking on the Source Code |
47 | 60 | -------------------------- |
48 | 61 |
|
49 | | -Please work off of the "3.0" branch if you're submitting changes to the latest stable release and use "master" if you're submitting changes to the latest development release. |
| 62 | +The current stable release series is 4.0. The current development release series |
| 63 | +is 5.0. Each release series is represented by a branch with the major and minor |
| 64 | +version numbers, e.g. 4.0 or 5.0. This branch is updated during the lifecycle of |
| 65 | +the release series. Specific releases are represented as tags with the full |
| 66 | +version number, e.g. 4.0.0 or 5.0development.0. |
| 67 | + |
| 68 | +If you are making a bug fix to the current stable release, you should |
| 69 | +work off of the stable branch, 4.0. If you are adding features or improving |
| 70 | +functionality, work off of master. The maintainers will merge master into the |
| 71 | +development series branch periodically. We will also occasionally merge ruleset |
| 72 | +fixes from master into the stable branch if the ruleset is important (i.e. a |
| 73 | +popular or high-security site), or if the version in stable is clearly broken. |
| 74 | + |
| 75 | +To submit changes, either use pull requests on GitHub or email patches to |
| 76 | +https-everywhere-rulesets@lists.eff.org (rulesets) or |
| 77 | +https-everywhere@lists.eff.org (code). |
50 | 78 |
|
51 | 79 | ### Writing rulesets |
52 | 80 |
|
53 | 81 | HTTPS Everywhere consists of a large number of rules for switching sites from HTTP to HTTPS. You can read more about how to write these rules here: https://www.eff.org/https-everywhere/rulesets |
54 | 82 |
|
55 | 83 | If you want to create new rules to submit to us, we expect them to be in the src/chrome/content/rules directory. That directory also contains a useful script, make-trivial-rule, to create a simple rule for a specified domain. There is also a script called trivial-validate.py, to check all the pending rules for several common errors and oversights. For example, if you wanted to make a rule for the example.com domain, you could run |
56 | 84 |
|
57 | | - sh ./make-trivial-rule example.com |
| 85 | + bash ./make-trivial-rule example.com |
58 | 86 |
|
59 | | -inside the rules directory. This would create Example.com.xml, which you could then take a look at and edit based on your knowledge of any specific URLs at example.com that do or don't work in HTTPS. You could then run |
| 87 | +inside the rules directory. This would create Example.com.xml, which you could then take a look at and edit based on your knowledge of any specific URLs at example.com that do or don't work in HTTPS. You should then run |
60 | 88 |
|
61 | | - python ../../../../utils/trivial-validate.py |
| 89 | + bash test.sh |
62 | 90 |
|
63 | 91 | to make sure that your rule is free of common mistakes. |
64 | 92 |
|
65 | 93 | ### Writing translations |
66 | 94 |
|
67 | | -If you would like to help translate HTTPS Everywhere into another language, you can do that through Transifex: https://www.transifex.com/projects/p/torproject/resources/. |
| 95 | +If you would like to help translate HTTPS Everywhere into your language, |
| 96 | +you can do that through the Tor Project's Transifex page: |
| 97 | +https://www.transifex.com/projects/p/torproject/. |
68 | 98 |
|
69 | 99 | ### Bug trackers and mailing lists |
70 | 100 |
|
71 | | -We currently have two bug trackers. The one on Github (https://github.com/EFForg/https-everywhere/issues) is recommended because it gets checked more frequently and has a friendlier user interface. The one on trac.torproject.org (https://trac.torproject.org/projects/tor/report/19) has a large backlog of bugs at this point, but it has the advantage of allowing you to post bugs anonymously using the "cypherpunks" or "writecode" account. (Note that you won't see replies unless you put an email address in the CC field.) |
| 101 | +We currently have two bug trackers. The one on Github (https://github.com/EFForg/https-everywhere/issues) is recommended because it gets checked more frequently and has a friendlier user interface. The one on trac.torproject.org (https://trac.torproject.org/projects/tor/report/19) has a large backlog of bugs at this point, but it has the advantage of allowing you to post bugs anonymously using the "cypherpunks" / "writecode" account. (Note that you won't see replies unless you put an email address in the CC field.) |
72 | 102 |
|
73 | 103 | We have two publicly-archived mailing lists: the https-everywhere list (https://lists.eff.org/mailman/listinfo/https-everywhere) is for discussing the project as a whole, and the https-everywhere-rulesets list (https://lists.eff.org/mailman/listinfo/https-everywhere-rules) is for discussing the rulesets and their contents, including patches and git pull requests. |
74 | 104 |
|
75 | | -Build Instructions |
76 | | ------------------- |
77 | | - |
78 | | -To build the Firefox version go to the git repository root and run: |
79 | | - |
80 | | - ./makexpi.sh |
81 | | - |
82 | | -To build the Chrome version go to the git repository root and run: |
83 | | - |
84 | | - ./makecrx.sh |
85 | | - |
86 | | -After building the extension the xpi files (for Firefox) and crx files (for Chrome) get created in the pkg directory. You can open those files within your browser to install the browser extension. |
87 | | - |
88 | | -Ruleset Tests |
| 105 | +Tests |
89 | 106 | ------------- |
90 | 107 |
|
91 | | -You can run ruleset tests by opening `about:config` and changing `extensions.https_everywhere.show_ruleset_tests` to true. Now when you open the HTTPS Everywhere context menu there will be a "Run HTTPS Everywhere Ruleset Tests" menu item. |
| 108 | +There are some very basic unittests under https-everywhere-tests/. These are run with |
92 | 109 |
|
93 | | -When you run the tests, be prepared to let your computer run them for a really long time. |
| 110 | + bash test.sh |
94 | 111 |
|
95 | | -Precommit Testing |
96 | | ------------------ |
| 112 | +Please help write more unittests and integration tests! |
97 | 113 |
|
98 | | -One can run the available test suites automatically by enabling the precommit |
99 | | -hook provided with: |
| 114 | +There are also ruleset tests, which aim to find broken rulesets by actually |
| 115 | +loading URLs in a browser and watching for Mixed Content Blocking to fire. |
| 116 | +The easiest way to run ruleset tests is to load a standalone Firefox instance |
| 117 | +with the tests enabled: |
100 | 118 |
|
101 | | - ln -s ../../hooks/precommit .git/hooks/pre-commit |
| 119 | + bash test.sh --justrun |
| 120 | + |
| 121 | +Then click the HTTPS Everywhere icon on the toolbar, and click "Run HTTPS |
| 122 | +Everywhere Ruleset Tests." When you run the tests, be prepared to let your |
| 123 | +computer run them for a really long time. |
0 commit comments