Skip to content

Commit 86f6290

Browse files
committed
Merge branch 'master' into rewriter
Conflicts: chromium/background.js chromium/rules.js
2 parents 68d9065 + b7098f8 commit 86f6290

File tree

8,480 files changed

+136363
-18925
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,480 files changed

+136363
-18925
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
*~
22
chromium.pem
33
dummy-chromium.pem
4-
pkg/crx
5-
pkg/*.crx
6-
pkg/*.xpi
4+
pkg/
75
src/chrome/content/rules/default.rulesets
6+
src/defaults/rulesets.sqlite
87
*.swp
98
tokenkeys.py*
109
.idea
1110
*.pyc
1211
from-preloads/
12+
test_profile/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "addon-sdk"]
2+
path = addon-sdk
3+
url = https://github.com/mozilla/addon-sdk.git

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Config copied from
2+
# http://www.theautomatedtester.co.uk/blog/2012/using-travis-ci-for-building-and-testing-firefox-addons.html
3+
# Use node_js because there are maybe more workers?
4+
language: python
5+
python:
6+
- "2.7"
7+
addons:
8+
firefox: "35.0"
9+
install:
10+
- sudo apt-get -qq install libxml2-dev libxslt-dev python-dev
11+
- pip install -r requirements.txt
12+
before_script:
13+
- sh -e /etc/init.d/xvfb start
14+
env:
15+
- DISPLAY=':99.0'
16+
script: ./test.sh

README.md

Lines changed: 74 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,123 @@
1-
HTTPS Everywhere
1+
HTTPS Everywhere [![Build Status](https://travis-ci.org/EFForg/https-everywhere.svg?branch=master)](https://travis-ci.org/EFForg/https-everywhere)
22
================
33

4-
Source Tree
5-
-----------
4+
Getting Started
5+
---------------
66

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:
88

9-
Important directories you might want to know about
9+
bash install-dev-dependencies.sh
1010

11-
src/ The Firefox source
11+
Run the tests for the Firefox version:
1212

13-
chromium/ The Chromium/Chrome source
14-
(not to be confused with Firefox browser "chrome" or UI)
13+
bash test.sh
1514

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:
1916

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:
2120

21+
bash run-chromium.sh
2222

23-
Installing Dependencies in Debian or Ubuntu
24-
-------------------------------------------
23+
Build the Firefox extension as a .xpi package:
2524

26-
sudo apt-get install python-lxml python-libxml2 libxml2-utils zip
25+
bash makexpi.sh
2726

28-
Installing Dependencies in Mac OS X
29-
-----------------------------------
27+
Build the Chromium extension as a .crx package:
3028

31-
We recommend Mac users install dependencies using Homebrew:
32-
http://mxcl.github.io/homebrew/
29+
bash makecrx.sh
3330

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/.
3532

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
3740

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+
-----------
3943

40-
echo PATH=/usr/local/bin:$PATH >> ~/.profile
44+
This is the source tree for HTTPS Everywhere for Firefox and Chrome.
4145

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
4347

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
4558

4659
Hacking on the Source Code
4760
--------------------------
4861

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).
5078

5179
### Writing rulesets
5280

5381
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
5482

5583
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
5684

57-
sh ./make-trivial-rule example.com
85+
bash ./make-trivial-rule example.com
5886

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
6088

61-
python ../../../../utils/trivial-validate.py
89+
bash test.sh
6290

6391
to make sure that your rule is free of common mistakes.
6492

6593
### Writing translations
6694

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/.
6898

6999
### Bug trackers and mailing lists
70100

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.)
72102

73103
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.
74104

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
89106
-------------
90107

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
92109

93-
When you run the tests, be prepared to let your computer run them for a really long time.
110+
bash test.sh
94111

95-
Precommit Testing
96-
-----------------
112+
Please help write more unittests and integration tests!
97113

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:
100118

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.

addon-sdk

Submodule addon-sdk added at 12f7d53

apache/README

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
These configs allow you to run an Apache that SSL listens on many local ports
2+
with a different certificate on each. This allows you to start up a Firefox
3+
that loads many different certs and tries to report them to the observatory
4+
simultaneously. This can be helpful for reproducing bugs.
5+
6+
Steps:
7+
8+
1. (optional) Run makeconfig.sh
9+
2. /usr/sbin/apache2 -d . -k start
10+
3. In your development Firefox profile, go to
11+
Preferences -> Advanced -> View Certificates
12+
Import -> select certificates/ca.crt
13+
Check the box for "Trust this CA to identify websites"
14+
Click OK
15+
about:config ->
16+
extensions.https_everywhere._observatory.alt_roots = true
17+
extensions.https_everywhere._observatory.enabled = true
18+
extensions.https_everywhere._observatory.use_custom_proxy = true
19+
extensions.https_everywhere._observatory.server_host = localhost:3001
20+
extensions.https_everywhere.LogLevel = 0
21+
22+
4. for n in `seq 3001 3100` ; do firefox https://localhost:$n/ ; done

0 commit comments

Comments
 (0)