Commit graph

508 commits

Author SHA1 Message Date
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
Arlo Breault
5d26f76ba1 Brace expansion is a bashism 2019-07-27 12:01:03 -04:00
Arlo Breault
03512bfa29 Move more UI code to use specific sites 2019-07-27 12:01:03 -04:00
Arlo Breault
a164d61f16 Remove tests referring to BadgeUI
Since that's been overhauled.  The whole ui.spec.js file probably needs
redoing.
2019-07-27 12:01:03 -04:00
Arlo Breault
0f33546fec Clean up some linting errors 2019-07-27 12:01:03 -04:00
Arlo Breault
e60f22833a Reimagine the badge
Trac 27385
2019-07-27 12:01:03 -04:00
David Fifield
0bded511b9 Add a "Deploying" section to proxy/README.md. 2019-07-27 09:53:09 -06:00
David Fifield
695554cbc5 Make "npm run build" include .htaccess.
Formerly it was copying static/*, and the wildcard skipped the dotfile.
2019-07-27 09:42:12 -06:00
David Fifield
905f8b78c1 bamsoftware.com -> freehaven.net in proxy/README.md.
https://bugs.torproject.org/31250
2019-07-27 09:31:16 -06:00
Cecylia Bocovich
299c12b2e9 Version bump to fix issue with addon update 2019-07-26 10:45:50 -04:00
Cecylia Bocovich
b46e7f127a Bump version to reflect icon changes
Bumping the version again to 0.0.7
2019-07-26 10:11:14 -04:00
Cecylia Bocovich
b00d1b7fd7 Made manifest icon square
The mozilla addon update failed with an error
`Error: Icon at "icons/status-on.png" must be square.`
I fixed the icon in the manifest to be 60x60 pixels.
2019-07-26 10:09:32 -04:00
Cecylia Bocovich
185edc4b15 Forgot version bump for previous tag 2019-07-26 10:02:17 -04:00
Cecylia Bocovich
bd43c345db Use freehaven.net domains for bridge and broker
A quick, temporary fix to get around Google safe browsing blockage of
bamsoftware.com
2019-07-26 09:58:34 -04:00
David Fifield
e67a659943 Fix tests for Params.getByteCount.
They were relying on the Query.parse interface, which was removed
separately.

https://bugs.torproject.org/31126#comment:5
2019-07-25 14:32:26 -06:00
David Fifield
f795fb5a33 Make tabs uniform in manifest.json. 2019-07-23 11:06:53 -06:00
David Fifield
74d3895ee9 Make the "Turn On/Off" text a label for the slider.
So that you can click on the text as well as the slider.
2019-07-23 10:51:47 -06:00
David Fifield
fac361c4a1 Bug 31203: Rewrite Parse.byteCount to fix bugs.
There were two problems having to do with looking up in the UNITS
object. (1) It was checking for undefined keys by comparing to null,
rather than undefined. (2) It was finding Object.prototype keys like
"toString".
2019-07-22 16:22:52 -06:00
David Fifield
abdda1c8bf Bug 31203: Add tests for Parse.byteCount and Params.getByteCount. 2019-07-22 16:22:52 -06:00
David Fifield
e87ec65858 Use URLSearchParams.toString instead of Query.buildString. 2019-07-18 18:30:25 -06:00
David Fifield
fdc5563f87 Bug 31126: Use URLSearchParams instead of Query.parse.
This standard interface does the same thing as Query.parse did, with a
different API on the return value. It doesn't have the problems with
keys inherited from Object.prototype that Query.parse did.
2019-07-18 18:29:59 -06:00
David Fifield
76b81bcf77 Remove unused Params.getString. 2019-07-18 16:32:56 -06:00
David Fifield
c1f6548602 Remove unused Params.getAddress.
It was formerly used for the "broker" and "relay" query string
parameters, which were removed in
debe9c3748.
2019-07-18 16:24:11 -06:00
Arlo Breault
d6d42e82aa Update the main page on the static website 2019-07-13 15:53:37 +02:00
Arlo Breault
6c6707ae9b Set the browser action icon to off when webrtc is disabled
This is now necessary since the webextension changed to default to on.

Follow up to 095f4a0

From trac 31067
2019-07-13 12:48:21 +02:00
Cecylia Bocovich
c02c4cfbbd Bump version of webextension 2019-07-12 10:47:34 -04:00
Cecylia Bocovich
1fad53d8d0 Adding back the STUN server port configuration
In Firefox, leaving out the STUN port caused connections to the STUN
server to fail
2019-07-12 10:21:38 -04:00
Arlo Breault
fab39ae57c Cleanup lints identified by eslint
Some files were omitted in the .eslintignore, left as an exercise to the
reader.

We probably want to reduce amount of globals overall and use proper es
modules.
2019-07-10 10:58:29 +02:00
Arlo Breault
ebeb45c8d6 Lint with eslint
Requires at least node v8.x
2019-07-10 10:58:29 +02:00
Arlo Breault
c12fcbeb85 Null out relay after closing
This was probably meant to be `@relay = null` is the coffeescript.
2019-07-10 10:58:29 +02:00
Arlo Breault
fb0578d840 Don't specify port for stun server
No idea why but, with it, when a client disconnects the datachannel
doesn't close.  This wasn't an issue prior to 359600d since the
configuration wasn't being passed to the peerconnection constructor.

This probably just makes the url invalid and falls back to a default in
libwebrtc.
2019-07-10 10:58:16 +02:00
Arlo Breault
6e95581f53 Don't overwrite global location 2019-07-10 10:56:00 +02:00