Cecylia Bocovich 07f2cd8073 bump version to 0.2.0 5 年之前
..
spec 8ab81fc6cd Update proxy config to take proxy type 5 年之前
static da8b98d090 Include language name with along with code 5 年之前
translation @ 488054eda4 07f2cd8073 bump version to 0.2.0 5 年之前
webext 07f2cd8073 bump version to 0.2.0 5 年之前
.eslintignore fab39ae57c Cleanup lints identified by eslint 5 年之前
.eslintrc.json 1b14810d34 Enforce consistent indentation in js 5 年之前
README.md 5732f1a630 Add --chown=:snowflake to rsync commands. 5 年之前
broker.js 8ab81fc6cd Update proxy config to take proxy type 5 年之前
config.js 8ab81fc6cd Update proxy config to take proxy type 5 年之前
init-badge.js 8ab81fc6cd Update proxy config to take proxy type 5 年之前
init-node.js 8ab81fc6cd Update proxy config to take proxy type 5 年之前
init-testing.js 8ab81fc6cd Update proxy config to take proxy type 5 年之前
init-webext.js 8ab81fc6cd Update proxy config to take proxy type 5 年之前
make.js da8b98d090 Include language name with along with code 5 年之前
package.json da8b98d090 Include language name with along with code 5 年之前
proxypair.js 64b66c855f Moved function comments to their definitions 5 年之前
shims.js fdc5563f87 Bug 31126: Use URLSearchParams instead of Query.parse. 5 年之前
snowflake.js 300a23c6a0 Changed variable name for multiplexed clients 5 年之前
ui.js 03512bfa29 Move more UI code to use specific sites 5 年之前
util.js 8de6e26c59 Remove Util.mightBeTBB 5 年之前
websocket.js aa107862c5 Move probe to WS class for reuse in the badge 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 --chown=:snowflake --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 --chown=:snowflake --chmod ug=rw,D+x --perms --delete -crv build/ staticiforme:/srv/snowflake.torproject.org/htdocs/

You can ignore errors of the form rsync: failed to set permissions on "<dirname>/": Operation not permitted (1).

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