Commit graph

839 commits

Author SHA1 Message Date
Arlo Breault
36eb07a6fc Use a static label for the button
Trac: 31685
2019-10-01 14:27:19 -04:00
Arlo Breault
a5071ec1d6 Add a favicon
Trac: 31537
2019-09-30 19:18:52 -04:00
Arlo Breault
8d81270a9f Add bridge probe to badge 2019-09-30 18:42:57 -04:00
Arlo Breault
d4aa9ad2b3 Reorder enable checks
First check that it is enabled before doing feature testing.

This will be useful in the badge so that probing only happens if it is
enabled.
2019-09-30 18:42:57 -04:00
Arlo Breault
aa107862c5 Move probe to WS class for reuse in the badge 2019-09-30 18:42:57 -04:00
Arlo Breault
685c3bd262 Disable the webext if the bridge is unreachable 2019-09-30 18:42:57 -04:00
Arlo Breault
19bc6d8858 Move missingFeature to initToggle in webext 2019-09-30 18:42:57 -04:00
Cecylia Bocovich
3c28380bc6 Add locks to safelog
The safelog Write function can be called from multiple go routines, and
it was not thread safe. These locks in particular allow us to pass the
logscrubber's output io.Writer to other libraries, such as pion.
2019-09-30 16:43:51 -04:00
Cecylia Bocovich
f3be34a459 Removed extraneous log messages
Many of our log messages were being used to generate metrics, but are
now being aggregated and logged to a separate metrics log file and so we
don't need them in the regular logs anymore.

This addresses the goal of ticket #30830, to remove unecessary messages
and keep broker logs for debugging purposes.
2019-09-19 16:48:14 -04:00
Cecylia Bocovich
b29b49fc1c Added a folder for documentation
Added a folder to hold snowflake specifications. This folder starts with
a file containing a partial broker spec that focuses on the metrics
reporting spec for CollecTor at the moment.
2019-09-16 14:29:16 -04:00
Arlo Breault
1b14810d34 Enforce consistent indentation in js 2019-08-27 18:19:51 -04:00
Cecylia Bocovich
00eb4aadf5 Modified broker /debug page to display counts only
The broker /debug page was displaying proxy IDs and roundtrip times. As
serna pointed out in bug #31460, the proxy IDs can be used to launch a
denial of service attack. As the metrics team pointed out on #21315, the
round trip time average can be potentially sensitive.

This change displays only proxy counts and uses ID lengths to
distinguish between standalone proxy-go instances and browser-based
snowflake proxies.
2019-08-27 10:01:00 -04:00
emma peel
ea442141db remove exclamation mark. ref https://grammar.yourdictionary.com/punctuation/when/when-to-use-exclamation-marks.html 2019-08-26 15:19:20 -04:00
Arlo Breault
131cf4f8ea Add branch to .gitmodule + bump to bbf11bb
This allows you to run `git submodule update --remote` to bump to the
latest commit on that branch.
2019-08-26 15:14:17 -04:00
Arlo Breault
9faf8293e6 Bump proxy/translation to HEAD of snowflakeaddon-messages.json_completed 2019-08-26 15:14:17 -04:00
Arlo Breault
1c550599b8 Automate generating the list of available languages for the badge
Note that getMessage in the badge depends on having a complete set of
translations, unlike the webextension, which will fallback to the
default for a string.
2019-08-26 15:14:17 -04:00
Arlo Breault
1e33ae830f Get badge locale from navigator.language 2019-08-26 15:14:17 -04:00
Arlo Breault
9c20ab3984 Copy completed translations over when building 2019-08-26 15:14:17 -04:00
Arlo Breault
a0dd3d9edc Add translation submodule
At the head of the snowflakeaddon-messages.json_completed branch
2019-08-26 15:14:17 -04:00
Cecylia Bocovich
4b6871a24e Version bump for bug #31385 2019-08-26 09:16:47 -04:00
Cecylia Bocovich
16a1b69823 Added check for active pair in onopen
Because the timeout makes the pair inactive, we should check for this
state in onopen before connecting to the client. Updated tests to set
the proxy pair to active before testing onopen. Also removed a
redundant statement.
2019-08-26 09:15:38 -04:00
Cecylia Bocovich
8a5941daab Fix to check running status before closing proxy
This fixes a bug reported in #31385. There was an error with the proxy
deadlock fix in #31100 where we close proxies regardless of connection
status.
2019-08-26 09:15:38 -04:00
David Fifield
6be7bedd06 Add --chmod ug=rw,D+x --perms to rsync commands.
This is an attempt to solve mixed-ownership permission issues.
https://bugs.torproject.org/31496
2019-08-23 22:51:27 -06:00
David Fifield
1d6a98a40e Limit the maximum horizontal content width to 55rem. 2019-08-23 22:44:36 -06:00
David Fifield
dff07d6672 Use less side padding on small screens. 2019-08-23 22:43:10 -06:00
David Fifield
49f4a710f8 Use more semantic HTML. 2019-08-23 22:43:10 -06:00
David Fifield
1063ef7b1d Fix certain attributes to be pixel counts, not CSS dimensions.
Found these using https://validator.w3.org/.
2019-08-23 21:56:39 -06:00
David Fifield
3bcd60ad10 Update the iframe embed height to match the live example.
The live example changed from "200px" to "240px" in
4e5a50f2b5.
2019-08-23 21:56:23 -06:00
David Fifield
73174b4039 Add ids to more elements in static/index.html. 2019-08-23 18:31:10 -06:00
David Fifield
0ef7c6f1fa Bug 31453: use only SVG for the status images. 2019-08-19 12:44:30 -06:00
David Fifield
f9173f61a2 Make a dark-mode version of the arrowhead icon.
The former icon used fill="context-fill", which I believe doesn't work
except in Mozilla's own extensions. So I changed that one to
fill="black" and made a new one with fill="white".
2019-08-19 12:24:10 -06:00
David Fifield
251b6a26fa Change the "running" color to #68B030.
Not so light against a white background.
https://bugs.torproject.org/31170#comment:13
2019-08-19 12:24:10 -06:00
David Fifield
6ab50e32b9 Toolbar icons that work in both light and dark modes.
https://bugs.torproject.org/31170#comment:8

I chose these icons for the "on" and "off" icons:
toolbar_icon_purple.svg → toolbar-on.svg
toolbar_icon_grey.svg → toolbar-off.svg

I then made toolbar-running.svg by copying toolbar-off.svg and changing
the stroke and fill from #4A4A4F to #40E0D0.
2019-08-19 12:24:09 -06:00
David Fifield
36815bd57b Popup CSS for dark mode.
In Firefox, this requires version 67 for support for
prefers-color-scheme media queries.
https://hacks.mozilla.org/2019/05/firefox-67-dark-mode-css-webrender/
To force Firefox into dark mode, set ui.systemUsesDarkTheme=1 (and
optionally browser.in-content.dark-mode=true, to put pages such as
about:addons into dark mode as well) in about:config. You can check if
it's working at https://bugzilla.mozilla.org/, which has its own
dark-mode styling. Note that this kind of dark mode is *independent* of
the "Dark" theme that can be selected in about:addons.

Chrome requires version 76 for prefers-color-scheme. You can force it by
running with the --force-dark-mode command-line option.
2019-08-19 12:24:09 -06:00
David Fifield
1e6dd4d86f Redo the status-running icon to match the others.
This one was missing from the redesigned icons. I made it by making a
copy of status-on.svg and changing the fill from #8000D7 to #40E0D0.

I didn't make a separate dark-mode version of the icon.
2019-08-19 12:24:09 -06:00
David Fifield
7e2936dcec Dark-mode images from Antonela.
https://bugs.torproject.org/31170#comment:3

Also revises the light-mode images.
2019-08-19 12:24:09 -06:00
Cecylia Bocovich
0aef40100a Implemented handler to fetch broker stats
This implements a handler at https://[snowflake-broker]/metrics for the
snowflake collecTor module to fetch stats from the broker. Logged
metrics are copied out to the response with a text/plain; charset=utf-8
content type. This implements bug #31376.
2019-08-16 09:12:49 -04:00
Arlo Breault
4e5a50f2b5 Start localization
Trac 30310
2019-08-15 17:15:37 -04:00
Cecylia Bocovich
f94ef87c46 Increase webextension poll period
Raise the webextension poll period from 5 to 20 seconds (bug 31200).
2019-08-12 13:14:25 -04:00
Cecylia Bocovich
0b55fd307a Version bump for webextension 2019-08-08 11:11:56 -04:00
Cecylia Bocovich
e77baabdcf Add a timeout to check if datachannel opened
This is similar to the deadlock bug in the proxy-go instances. If the
proxy-pair sends an answer to the broker, it previously assumed that the
datachannel would be opened and the pair reused only once the
datachannel closed. However, sometimes the datachannel never opens due
to ICE errors or a misbehaving/buggy client causing the proxy to
infinitely loop and the proxy-pair to remain active.

This commit reuses the pair.running attribute to indicate whether or not
the datachannel has been opened and sets a timeout to close the
proxy-pair if it has not been opened by that time.
2019-08-08 10:36:28 -04:00
Cecylia Bocovich
6cc944f2b4 Reuse proxypair if sendAnswer fails
Make sure to set proxypair.active to false if createAnswer or
setLocalDescription fails. This should prevent one edge case the results
in an infinite loop described in ticket #31100.
2019-08-08 10:36:28 -04:00
David Fifield
990047b2f5 Control statusimg using CSS, rather than setting an img src. 2019-07-31 19:09:46 -06:00
David Fifield
8f885c7557 Set an "error" class instead of hardcoding a text color. 2019-07-31 19:09:46 -06:00
David Fifield
8a56baa8e1 Identify popup elements by id. 2019-07-31 19:09:44 -06:00
Arlo Breault
e6f7633961 Remove mentions of snowflake.html
It was removed in e60f228 and aa27c05
2019-07-31 18:14:00 -04:00
Arlo Breault
b324d9d42f Move icons/ to assets/
There's a default alias for icons/ in apache,
https://www.electrictoolbox.com/apache-icons-directory/
2019-07-31 17:59:48 -04:00
Arlo Breault
5321223240 Use execSync in make.js
695554c highlighted the race here.
2019-07-31 16:43:56 -04:00
Arlo Breault
aa27c0556c Redirect removed snowflake.html 2019-07-31 15:49:21 -04:00
Arlo Breault
8de6e26c59 Remove Util.mightBeTBB
Trac 31222
2019-07-27 12:01:03 -04:00