Cecylia Bocovich 0b55fd307a Version bump for webextension 5 年之前
..
spec a164d61f16 Remove tests referring to BadgeUI 5 年之前
static 990047b2f5 Control statusimg using CSS, rather than setting an img src. 5 年之前
webext 0b55fd307a Version bump for webextension 5 年之前
.eslintignore fab39ae57c Cleanup lints identified by eslint 5 年之前
.eslintrc.json fab39ae57c Cleanup lints identified by eslint 5 年之前
README.md e6f7633961 Remove mentions of snowflake.html 5 年之前
broker.js fab39ae57c Cleanup lints identified by eslint 5 年之前
config.js bd43c345db Use freehaven.net domains for bridge and broker 5 年之前
init-badge.js 990047b2f5 Control statusimg using CSS, rather than setting an img src. 5 年之前
init-node.js fab39ae57c Cleanup lints identified by eslint 5 年之前
init-testing.js 03512bfa29 Move more UI code to use specific sites 5 年之前
init-webext.js b324d9d42f Move icons/ to assets/ 5 年之前
make.js b324d9d42f Move icons/ to assets/ 5 年之前
package.json ebeb45c8d6 Lint with eslint 5 年之前
proxypair.js e77baabdcf Add a timeout to check if datachannel opened 5 年之前
shims.js fdc5563f87 Bug 31126: Use URLSearchParams instead of Query.parse. 5 年之前
snowflake.js e77baabdcf Add a timeout to check if datachannel opened 5 年之前
ui.js 03512bfa29 Move more UI code to use specific sites 5 年之前
util.js 8de6e26c59 Remove Util.mightBeTBB 5 年之前
websocket.js e87ec65858 Use URLSearchParams.toString instead of Query.buildString. 5 年之前

README.md

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 --delete -crv build/ staticiforme:/srv/snowflake.torproject.org/htdocs/

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

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