snowflake/proxy
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
..
spec Added check for active pair in onopen 2019-08-26 09:15:38 -04:00
static Limit the maximum horizontal content width to 55rem. 2019-08-23 22:44:36 -06:00
webext Toolbar icons that work in both light and dark modes. 2019-08-19 12:24:09 -06:00
.eslintignore Cleanup lints identified by eslint 2019-07-10 10:58:29 +02:00
.eslintrc.json Cleanup lints identified by eslint 2019-07-10 10:58:29 +02:00
broker.js Cleanup lints identified by eslint 2019-07-10 10:58:29 +02:00
config.js Increase webextension poll period 2019-08-12 13:14:25 -04:00
init-badge.js Start localization 2019-08-15 17:15:37 -04:00
init-node.js Cleanup lints identified by eslint 2019-07-10 10:58:29 +02:00
init-testing.js Move more UI code to use specific sites 2019-07-27 12:01:03 -04:00
init-webext.js Toolbar icons that work in both light and dark modes. 2019-08-19 12:24:09 -06:00
make.js Start localization 2019-08-15 17:15:37 -04:00
package.json Lint with eslint 2019-07-10 10:58:29 +02:00
proxypair.js Added check for active pair in onopen 2019-08-26 09:15:38 -04:00
README.md Add --chmod ug=rw,D+x --perms to rsync commands. 2019-08-23 22:51:27 -06:00
shims.js Bug 31126: Use URLSearchParams instead of Query.parse. 2019-07-18 18:29:59 -06:00
snowflake.js Added check for active pair in onopen 2019-08-26 09:15:38 -04:00
ui.js Move more UI code to use specific sites 2019-07-27 12:01:03 -04:00
util.js Remove Util.mightBeTBB 2019-07-27 12:01:03 -04:00
websocket.js Use URLSearchParams.toString instead of Query.buildString. 2019-07-18 18:30:25 -06:00

This is the browser proxy component of Snowflake.

Embedding

See https://snowflake.torproject.org/ for more info:

<iframe src="https://snowflake.torproject.org/embed.html" width="88" height="16" frameborder="0" scrolling="no"></iframe>

Building

npm run build

Testing

Unit testing with Jasmine are available with:

npm install
npm test

To run locally, start an http server in build/ and navigate to /embed.html.

Preparing to deploy

Background information:

You need to be in LDAP group "snowflake" and have set up an SSH key with your LDAP account. In your ~/.ssh/config file, you should have something like:

Host staticiforme
HostName staticiforme.torproject.org
User <your user name>
ProxyJump people.torproject.org
IdentityFile ~/.ssh/tor

Deploying

npm run build

Do a "dry run" rsync with -n to check that only expected files are being changed. If you don't understand why a file would be updated, you can add the -i option to see the reason.

rsync -n --chmod ug=rw,D+x --perms --delete -crv build/ staticiforme:/srv/snowflake.torproject.org/htdocs/

If it looks good, then repeat the rsync without -n.

rsync --chmod ug=rw,D+x --perms --delete -crv build/ staticiforme:/srv/snowflake.torproject.org/htdocs/

Then run the command to copy the new files to the live web servers:

ssh staticiforme 'static-update-component snowflake.torproject.org'

Parameters

With no parameters, snowflake uses the default relay snowflake.freehaven.net:443 and uses automatic signaling with the default broker at https://snowflake-broker.freehaven.net/.