Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T18:22:11Zhttps://gitlab.torproject.org/legacy/trac/-/issues/34268Creating a service to do the work in the background and implementing a wakelock.2020-06-13T18:22:11ZHashikDCreating a service to do the work in the background and implementing a wakelock.For the application to act as a proxy in the background we need to run it as a service. In Android there are two types of services...
**Background service**: Counter-intuitively this is not what we are going to use since the Android syst...For the application to act as a proxy in the background we need to run it as a service. In Android there are two types of services...
**Background service**: Counter-intuitively this is not what we are going to use since the Android system will kill the service after the user leaves the application.\\
----
**Foreground service**: This service requires us to run a notification constantly. But this service will work even if the user leaves the application.\\
**Problem**: Service gets killed if the screen is turned off.\\
**Solution**: Implementing Android's Wakelock feature so that the Android system will not kill our service.https://gitlab.torproject.org/legacy/trac/-/issues/34267Compiling the WebRTC Google library.2020-06-13T18:22:10ZHashikDCompiling the WebRTC Google library.Compiling the library for our project using Google's documentation.\\
http://webrtc.github.io/webrtc-org/native-code/android/Compiling the library for our project using Google's documentation.\\
http://webrtc.github.io/webrtc-org/native-code/android/https://gitlab.torproject.org/legacy/trac/-/issues/34266Creating and setting up the libraries and the project.2020-06-13T18:22:10ZHashikDCreating and setting up the libraries and the project.Discussion about the packages, supported API versions (Android versions), etc. can be discussed here. Things about before getting the app started and off the ground.Discussion about the packages, supported API versions (Android versions), etc. can be discussed here. Things about before getting the app started and off the ground.https://gitlab.torproject.org/legacy/trac/-/issues/34265Library selection for WebSocket communication with Tor relay.2020-06-13T18:22:09ZHashikDLibrary selection for WebSocket communication with Tor relay.For WebSocket libraries here are some mentions: \\
https://github.com/Tinder/Scarlet - Designed for Android, hence preferred.\\
https://github.com/TooTallNate/Java-WebSocket - Popular Java lib.\\
https://github.com/facundofarias/awesome-...For WebSocket libraries here are some mentions: \\
https://github.com/Tinder/Scarlet - Designed for Android, hence preferred.\\
https://github.com/TooTallNate/Java-WebSocket - Popular Java lib.\\
https://github.com/facundofarias/awesome-websockets - Curated list of WS.https://gitlab.torproject.org/legacy/trac/-/issues/34264Discussion on using a library for HTTP requests.2020-06-13T18:22:09ZHashikDDiscussion on using a library for HTTP requests.Since we are using POST request in long polling fashion to get the SDP offer from the broker and sending an answer. Since this is only a two-time use, do we need Retrofit library or if OkHttp is suffice. Retrofit uses OkHttp and it is a ...Since we are using POST request in long polling fashion to get the SDP offer from the broker and sending an answer. Since this is only a two-time use, do we need Retrofit library or if OkHttp is suffice. Retrofit uses OkHttp and it is a little bit bloated but feature-rich as compared to OkHttp.https://gitlab.torproject.org/legacy/trac/-/issues/34263Library selection for using WebRTC for the project.2020-06-13T18:22:08ZHashikDLibrary selection for using WebRTC for the project.Selecting a good and resilient library with frequent updates is imperative, these are the libraries available:
\\
Google's official library that we have to compile to use in our project: http://webrtc.github.io/webrtc-org/native-code/an...Selecting a good and resilient library with frequent updates is imperative, these are the libraries available:
\\
Google's official library that we have to compile to use in our project: http://webrtc.github.io/webrtc-org/native-code/android/
\\
~~Ant Server's library: https://github.com/ant-media/Ant-Media-Server/wiki/WebRTC-Android-SDK-Documentation - Here they used "Ant Media Server" as signaling server we can change that.~~
Ant Media Server uses WebRTC library on top of that they added their own functionality to make it work with Ant Media Server. Which is not very useful for our project.https://gitlab.torproject.org/legacy/trac/-/issues/34198Include full broker messaging spec in /doc2020-06-13T18:22:07ZCecylia BocovichInclude full broker messaging spec in /docThis adds information about the broker API, with the messaging protocol and the endpoints used by clients and proxies.
This is a prerequisite for our work to implement a Snowflake proxy on Android.This adds information about the broker API, with the messaging protocol and the endpoints used by clients and proxies.
This is a prerequisite for our work to implement a Snowflake proxy on Android.Cecylia BocovichCecylia Bocovichhttps://gitlab.torproject.org/legacy/trac/-/issues/34151Readme needs update2020-06-13T18:22:07ZHashikDReadme needs updateFor testing, according to ReadMe.md...
''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''
_npm run build_ needs to be a prerequisite before...For testing, according to ReadMe.md...
''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''
_npm run build_ needs to be a prerequisite before starting the server and navigating to /embed.html.HashikDHashikDhttps://gitlab.torproject.org/legacy/trac/-/issues/34147Remove redundant languages from snowflake page2020-06-13T18:22:07ZRoger DingledineRemove redundant languages from snowflake pagehttps://snowflake.torproject.org/
offers me en, en_GB, and en_US in the language drop-down menu. We should have one English, not three.
More generally, I bet we have a policy somewhere about which languages we want to be sure to include...https://snowflake.torproject.org/
offers me en, en_GB, and en_US in the language drop-down menu. We should have one English, not three.
More generally, I bet we have a policy somewhere about which languages we want to be sure to include when we have translated something, and we should see if we're missing any of those; and also I hope we have a policy about which languages to *not* include (and ideally we should go back to transifex and remove those from the set that people can translate, to avoid giving people the impression that they will be doing something useful if they e.g. translate en_US to en_GB).
I'm sorry I don't know more -- I bet Emma or Antonela or Gus will know more about whether we have languages policies and habits in place. :)https://gitlab.torproject.org/legacy/trac/-/issues/34146localize screenshots on snowflake page2020-06-13T18:22:06ZRoger Dingledinelocalize screenshots on snowflake pagehttps://snowflake.torproject.org/?lang=zh_CN
scroll down to the picture of Tor Browser's network settings. That's an English Tor Browser. Should the Chinese version of the page be showing people using a Tor Browser in Chinese?https://snowflake.torproject.org/?lang=zh_CN
scroll down to the picture of Tor Browser's network settings. That's an English Tor Browser. Should the Chinese version of the page be showing people using a Tor Browser in Chinese?https://gitlab.torproject.org/legacy/trac/-/issues/34140Require semicolons2020-06-13T18:22:06ZArlo BreaultRequire semicolonshttps://eslint.org/docs/rules/semi
From https://github.com/arlolra/snowflake-webext/commit/d0fc6aa10cc6a8cc85b9037d780e53282ae83bea#r38995051https://eslint.org/docs/rules/semi
From https://github.com/arlolra/snowflake-webext/commit/d0fc6aa10cc6a8cc85b9037d780e53282ae83bea#r38995051https://gitlab.torproject.org/legacy/trac/-/issues/34132Fix running an npm globally installed snowflake2020-06-13T18:22:05ZArlo BreaultFix running an npm globally installed snowflakeSnowflake is now an [npm published package](https://www.npmjs.com/package/snowflake-pt) that can install a global bin with `npm i -g`
It seems to be missing a `#!/usr/bin/env node` at the top of the script thoughSnowflake is now an [npm published package](https://www.npmjs.com/package/snowflake-pt) that can install a global bin with `npm i -g`
It seems to be missing a `#!/usr/bin/env node` at the top of the script thoughhttps://gitlab.torproject.org/legacy/trac/-/issues/34129Use STUN to determine NAT behaviour of peers2020-06-30T16:07:44ZCecylia BocovichUse STUN to determine NAT behaviour of peersIn investigating high proxy failure rates at clients (#33666) and the logistics of running our own STUN server (#25591), I came across [RFC5780](https://tools.ietf.org/html/rfc5780), which outlines steps to identify NATs with "endpoint i...In investigating high proxy failure rates at clients (#33666) and the logistics of running our own STUN server (#25591), I came across [RFC5780](https://tools.ietf.org/html/rfc5780), which outlines steps to identify NATs with "endpoint independent mapping and filtering".
[Section 4.3](https://tools.ietf.org/html/rfc5780#section-4.3) outlines how a client can use a STUN server with an alternate IP address (returned in the first STUN binding request response) to determine how restrictive their NAT is.
This would be useful to match up clients with snowflake proxies that have compatible NATs. We still have the following questions:
- ~~are there public STUN servers that support this feature?~~
Yes there are several candidates.
- ~~does the pion/stun library we use support this feature for STUN clients?~~
Not yet but we can implement the feature.
- If we're able to implement our own STUN server behind a domain-fronted connection (#25591), how can we implement this functionality?
I see at least one open source STUN server implementation that claims to support this (written in C): https://github.com/coturn/coturnCecylia BocovichCecylia Bocovichhttps://gitlab.torproject.org/legacy/trac/-/issues/34128The badge should have a version number discoverable in the source2020-06-13T18:22:04ZArlo BreaultThe badge should have a version number discoverable in the sourceIt's not clear if https://snowflake.torproject.org/embed.html is running `0.3.0`
Was it published after the most recent release?It's not clear if https://snowflake.torproject.org/embed.html is running `0.3.0`
Was it published after the most recent release?https://gitlab.torproject.org/legacy/trac/-/issues/34127npm publish as part of the release process2020-06-13T18:22:03ZArlo Breaultnpm publish as part of the release processConsider `npm publish`ing when a new release is made.
The patch here makes updating the package.json part of the release process,
https://github.com/arlolra/snowflake-webext/commit/7231928c56ad509419c20ed1bb9be5645373c86cConsider `npm publish`ing when a new release is made.
The patch here makes updating the package.json part of the release process,
https://github.com/arlolra/snowflake-webext/commit/7231928c56ad509419c20ed1bb9be5645373c86chttps://gitlab.torproject.org/legacy/trac/-/issues/34126Handle onicecandidate firing after connection closed2020-06-13T18:22:02ZArlo BreaultHandle onicecandidate firing after connection closedThis may just be an issue with node-webrtc, but `Broker.sendAnswer` fires when waiting on an offer times out.
https://github.com/arlolra/snowflake-webext/commit/529a789bfcb9539176288f6659e7f2a60c2d6271This may just be an issue with node-webrtc, but `Broker.sendAnswer` fires when waiting on an offer times out.
https://github.com/arlolra/snowflake-webext/commit/529a789bfcb9539176288f6659e7f2a60c2d6271https://gitlab.torproject.org/legacy/trac/-/issues/34124snowflake funktioniert nicht2020-06-13T18:22:02Zcypherpunkssnowflake funktioniert nichtAnzeige: WebRTC-Fähigkeit nicht erkannt.
Was soll ich tun?Anzeige: WebRTC-Fähigkeit nicht erkannt.
Was soll ich tun?https://gitlab.torproject.org/legacy/trac/-/issues/34092Snowflake no longer working on Google Chrome2020-06-13T18:22:01ZcypherpunksSnowflake no longer working on Google ChromeExtension icon disappeared and cannot enable Snowflake in Google Chrome.Extension icon disappeared and cannot enable Snowflake in Google Chrome.https://gitlab.torproject.org/legacy/trac/-/issues/34080Avoid double delays from ReconnectTimeout2020-06-13T18:22:01ZDavid Fifielddcf@torproject.orgAvoid double delays from ReconnectTimeout[ReconnectTimeout](https://gitweb.torproject.org/pluggable-transports/snowflake.git/tree/client/lib/snowflake.go?id=72cfb96edeb7c9a3c93d38539bc31a51e30dbe8d#n18) is used in 2 places:
* In [exchangeSDP](https://gitweb.torproject.org/plug...[ReconnectTimeout](https://gitweb.torproject.org/pluggable-transports/snowflake.git/tree/client/lib/snowflake.go?id=72cfb96edeb7c9a3c93d38539bc31a51e30dbe8d#n18) is used in 2 places:
* In [exchangeSDP](https://gitweb.torproject.org/pluggable-transports/snowflake.git/tree/client/lib/webrtc.go?id=72cfb96edeb7c9a3c93d38539bc31a51e30dbe8d#n223), where it is a delay inserted between calls to `broker.Negotiate` until one of them succeeds.
```
Failed to retrieve answer. Retrying in 10s
}}}
* In the main [ConnectLoop](https://gitweb.torproject.org/pluggable-transports/snowflake.git/tree/client/snowflake.go?id=72cfb96edeb7c9a3c93d38539bc31a51e30dbe8d#n27), where it is a delay inserted between every check for getting a new snowflake.
{{{
WebRTC: <errmsg> Retrying in 10s...
}}}
The broker itself also terminates requests after 10s when the chosen proxy doesn't respond: `BrokerChannel Response: 504 Gateway Timeout`.
This situation sometimes results in double delays. Here are two cases I've identified.
* The client requests a proxy, the broker responds immediately with an answer, but the proxy doesn't work. After waiting the `DataChannelTimeout` to decide that the proxy doesn't work, the client waits an _additional_ `ReconnectTimeout` in `ConnectLoop`.
Here, I've set `DataChannelTimeout` to 10s. Notice that between `DataChannel created` and `Collecting a new Snowflake` there are 20s (which is `DataChannelTimeout` + `ReconnectTimeout`), when it really should only be 10s.
{{{
2020/04/30 22:38:29 Received Answer.
2020/04/30 22:38:29 WebRTC: DataChannel created.
2020/04/30 22:38:39 establishDataChannel: timeout waiting for DataChannel.OnOpen
2020/04/30 22:38:39 WebRTC: closing PeerConnection
2020/04/30 22:38:39 WebRTC: Closing
2020/04/30 22:38:39 WebRTC: WebRTC: Could not establish DataChannel Retrying in 10s...
2020/04/30 22:38:49 WebRTC: Collecting a new Snowflake. Currently at [0/1]
```
* The client requests a proxy, and the broker waits for 10s to respond with a 504 Gateway Timeout (indicating that the chosen proxy did not return an answer to the broker in time). The client waits 10s for the broker to respond, then waits another `ReconnectTimeout` in exchangeSDP before trying the broker again.
```
2020/04/30 22:39:30 Negotiating via BrokerChannel...
2020/04/30 22:39:41 BrokerChannel Response: 504 Gateway Timeout
2020/04/30 22:39:41 BrokerChannel Error: Unexpected error, no answer.
2020/04/30 22:39:41 Failed to retrieve answer. Retrying in 10s
2020/04/30 22:39:51 Negotiating via BrokerChannel...
}}}
Both these cases can probably be fixed by running the timer in parallel with the periodic operation they are rate limiting. That is, instead of
{{{
for {
operation()
<-time.After(ReconnectTimeout)
}
```
it can be
```
for {
timer := time.After(ReconnectTimeout)
operation()
<-timer
}
```
That way, if the operation itself takes more than 10s, `ReconnectTimeout` doesn't impose any additional delay.https://gitlab.torproject.org/legacy/trac/-/issues/34075Implement metrics to measure snowflake churn2020-06-13T18:22:01ZCecylia BocovichImplement metrics to measure snowflake churnAs discussed in the meeting this week, it would be useful to know how often snowflake proxy IP addresses actually change. We collect counts of unique IPs on any given day, but not how much variance we get in IP addresses over time.
This...As discussed in the meeting this week, it would be useful to know how often snowflake proxy IP addresses actually change. We collect counts of unique IPs on any given day, but not how much variance we get in IP addresses over time.
This relates to our ability to resist censorship, as snowflake relies in part on the claim that snowflakes are ephemeral, changing, and difficult to block exhaustively.
Let's implement some metrics to see how much snowflake IPs change.