16:19:56 <anadahz> Confused about the meek client metrics in Turkmenistan -- https://metrics.torproject.org/userstats-bridge-combined.png?start=2021-08-02&end=2021-11-04&country=tm 16:20:39 <anadahz> How come and there are so many meek clients in Turkmenistan? 16:20:54 <dcf1> Here is a graph with some more context 16:20:56 <dcf1> https://people.torproject.org/~dcf/metrics-country.html?start=2021-08-01&end=2021-11-05&country=tm 16:21:00 <meskio> does it look like related to snowflake going down? 16:21:13 <dcf1> however zoom out a bit to get even *more* context (esp. wrt relay users) 16:21:15 <dcf1> https://people.torproject.org/~dcf/metrics-country.html?start=2021-07-01&end=2021-11-05&country=tm 16:21:23 <cohosh> related info on tor blocking in TM: https://gitlab.torproject.org/tpo/community/support/-/issues/40030 16:22:10 <dcf1> to me it looks like OR and meek were rising simultaneously, then snowflake and OR got blocked. 16:22:33 <cohosh> wow 16:22:49 <meskio> blocked? or our failure with probetest? 16:23:45 <dcf1> but snowflake users globally did not go to zero in the same way https://metrics.torproject.org/userstats-bridge-transport.html?start=2021-08-06&end=2021-11-04&transport=snowflake 16:24:05 <anadahz> On 2021-10-31 the amount of meek clients count were almost spike to 1,5 times than before. 16:24:05 <meskio> I see what you mean :( 16:24:09 <cohosh> yeah this looks suspiciously close to zero
Using the bidirectional nature of blocking in Turkmenistan, we can see that the block on Snowflake is effected by (at least) DNS and SNI blocking of the broker's front domain, cdn.sstatic.net.
$ dig @$TARGET +noedns +short +timeout=5 www.google.com;; connection timed out; no servers could be reached$ curl --connect-to ::$TARGET: --connect-timeout 5 https://www.google.com/ -D -curl: (60) SSL: no alternative certificate subject name matches target host name 'www.google.com'
AFAIK we use the same SNI for moat so I assume moat is also affected by this block. I'm curious how the bridge usage hasn't gone down, maybe because they only need the domain fronting to work to refresh the bridges and most users already have working bridges.
Here are some snowflake bridge lines that uses an alternative fronting domain. These bridge lines instruct snowflake to use an alternative version of fronting domains that have the potential to bypass the censorship on the current fronting domain.
To use these bridges, go to about:preferences#tor check use a Bridge, select Provide a bridge (These terms may differ in local languages), and paste one of the following bridge lines below into it. This need to be done before connecting to the Tor network.
This is an unexpected result and we currently don't have enough information to understand what has gone wrong. Once snowflake!67 is merged and released, some information about the reason for failure will be included in the Tor log. This should allow us to gain insight into failure.
Based on external testing of these four front domains, it seems that only foursquare.com is blocked, and it is blocked only by SNI, not DNS.
$ TARGET="$(dig +short telecom.tm)" # 95.85.120.6$ dig @$TARGET +noedns +timeout=5 fastly.jsdelivr.net;; connection timed out; no servers could be reached$ dig @$TARGET +noedns +timeout=5 b.stripecdn.com;; connection timed out; no servers could be reached$ dig @$TARGET +noedns +timeout=5 cdn.shopify.com;; connection timed out; no servers could be reached$ dig @$TARGET +noedns +timeout=5 foursquare.com;; connection timed out; no servers could be reached$ curl --connect-to ::$TARGET: --connect-timeout 5 https://fastly.jsdelivr.net/curl: (60) SSL: no alternative certificate subject name matches target host name 'fastly.jsdelivr.net'$ curl --connect-to ::$TARGET: --connect-timeout 5 https://b.stripecdn.com/curl: (60) SSL: no alternative certificate subject name matches target host name 'b.stripecdn.com'$ curl --connect-to ::$TARGET: --connect-timeout 5 https://cdn.shopify.com/curl: (60) SSL: no alternative certificate subject name matches target host name 'cdn.shopify.com'$ curl --connect-to ::$TARGET: --connect-timeout 5 https://foursquare.com/curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to foursquare.com:443
What is the status here? We think Snowflake is currently broken in .tm, because they block our front domain, and we've explored some other front domains that ought to work, but they didn't work in a real-world test, and we're not sure why?
I asked the user form Turkmenistan to check if the snowflake bridges would help to connect. The user tried them and reported back that the bridges did not work for them
@nina if you are in contact with someone from Turkmenistan, it would be helpful to ask them to try the AMP cache rendezvous. The normal domain-fronting rendezvous does not work in Turkmenistan because the front domain, cdn.sstatic.net, is blocked by DNS injection, which can be tested from outside the country (more info):
I have received feedback from a V2Ray user living in Turkmenistan that Cloudflare(a CDN network)'s IP address space is now being partially blocked(some of Cloudflare's IP address is inaccessible, based on https://github.com/TulvL/cloudflare-ip-tester ). The hypothesis is that fastly is now blocked by IP in a similar way, which could explain our test result and user feedback.
We can:
Request a user to test if the fronted website is still accessible
Setup a vantage point in Turkmenistan
Use idle scan(https://en.wikipedia.org/wiki/Idle_scan) to try to test the network connectivity status between Turkmenistan devices and CDN networks. (This is a hostile network activity and should proceed with caution)
It seems that meek-azure is working quite well as TM gov is using Skype (and Gmail) for their internal comms. @shelikhoo would it be possible to use meek-azure as domain fronting for the snowflake broker?
Snowflake used azure as the default domain front until just over a year ago. You can see when we made the change from the commit where we updated the torrc file.
We switched to fastly shortly after microsoft released a statement saying they would start actively blocking domain fronted connections through microsoft azure but the azure account we used for Snowflake is still up and working.
The following bridge line should just work in Tor Browser:
I've just confirmed that this does work. So as a quick workaround, before rdsys!48 (merged) gets merged, users should be able to use this as a custom bridge.
Shoot :( there's some progress in the sense that the broker connection is working now, but it looks like the client is having trouble connecting to the proxies.
And port 3478 is blocked in TM
This could be the reason why, if the client can't connect to the STUN servers, then it's possible the offers don't contain enough information to allow the connection to the proxies to happen. Will dig around to see if there's a STUN server that's not running on port 3478.
I did some testing myself, and confirmed that when the STUN servers are not reachable, Snowflake doesn't log an error and instead proceeds to send an offer SDP without any externally accessible candidates:
Whether or not the connection succeeds has to do with the client's NAT behaviour. Some NAT setups require both sides to have valid candidates, while others only require one side. My guess is that if the users are on mobile, we'll see the behaviour pasted in the logs above where the client keeps asking the broker for more proxies and then times out, failing to connect.
I did some digging in the old sources we used to find our current list of STUN servers as well as a new list and found a few with non standard ports. Here's another bridge line to try:
8/18/22, 19:45:35.955 [NOTICE] New control connection opened from 127.0.0.1.8/18/22, 19:45:35.956 [NOTICE] New control connection opened from 127.0.0.1.8/18/22, 19:45:35.994 [NOTICE] Opening Socks listener on 127.0.0.1:91508/18/22, 19:45:35.994 [NOTICE] Opened Socks listener connection (ready) on 127.0.0.1:91508/18/22, 19:45:36.241 [NOTICE] Bootstrapped 1% (conn_pt): Connecting to pluggable transport8/18/22, 19:45:36.243 [NOTICE] Bootstrapped 2% (conn_done_pt): Connected to pluggable transport8/18/22, 19:45:36.292 [NOTICE] Bootstrapped 10% (conn_done): Connected to a relay8/18/22, 19:45:42.870 [NOTICE] Bootstrapped 14% (handshake): Handshaking with a relay8/18/22, 19:45:48.238 [NOTICE] Bootstrapped 15% (handshake_done): Handshake with a relay done8/18/22, 19:45:48.239 [NOTICE] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits8/18/22, 19:45:48.240 [NOTICE] Bootstrapped 95% (circuit_create): Establishing a Tor circuit8/18/22, 19:45:59.547 [NOTICE] Guard $97700DFE9F483596DDA6264C4D7DF7641E1E39CE ($97700DFE9F483596DDA6264C4D7DF7641E1E39CE) is failing more circuits than usual. Most likely this means the Tor network is overloaded. Success counts are 160/230. Use counts are 86/95. 209 circuits completed, 7 were unusable, 25 collapsed, and 30 timed out. For reference, your timeout cutoff is 60 seconds.8/18/22, 19:46:06.269 [NOTICE] Bootstrapped 100% (done): Done8/18/22, 19:46:06.395 [NOTICE] New control connection opened from 127.0.0.1.
this one uses the same STUN servers as #40024 (comment 2829141), but replaces the domain name with the IPv4 address. In case the censor is filtering DNS requests for domains with the key word "stun".
@gus@ValdikSS to follow up on the STUN blocking from earlier, I just set up a STUN server on ports 8080 and 8443 to test the theory that if Turkmentelecom and/or AGTS are blocking STUN ports, STUN messages may still go through if the server is running on unusual ports. You can use it with the following bridge line:
I'm curious about whether this works in either AGTS or Turkmentelecom. I can also rotate these ports or try ports that may have potentially more collateral damage associated with them. If it works, perhaps we can attempt to set up more STUN servers on ports other than 3478 or 3479.
I'm afraid that finding non-blocked hosting provider would be a challenging task. The IP address you've provided, 161.35.66.96, is a Digital Ocean, and it's IP ranges, as well as many other hostings, are blocked.
[NOTICE] New control connection opened from 127.0.0.1.[NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.[NOTICE] Switching to guard context "bridges" (was using "default")[NOTICE] Opening Socks listener on 127.0.0.1:9150[NOTICE] Opened Socks listener connection (ready) on 127.0.0.1:9150[NOTICE] Bootstrapped 1% (conn_pt): Connecting to pluggable transport[NOTICE] Bootstrapped 2% (conn_done_pt): Connected to pluggable transport[NOTICE] Bootstrapped 10% (conn_done): Connected to a relay[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker failure read tcp [scrubbed]->[scrubbed]: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": offer created[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": broker rendezvous peer received[NOTICE] Managed proxy "TorBrowser\Tor\PluggableTransports\snowflake-client.exe": trying a new proxy: timeout waiting for DataChannel.OnOpen[WARN] Problem bootstrapping. Stuck at 10% (conn_done): Connected to a relay. (DONE; DONE; count 1; recommendation warn; host 2B280B23E1107BB62ABFC40DDCC8824814F80A72 at 192.0.2.3:80)[WARN] 1 connections have failed:[WARN] 1 connections died in state handshaking (TLS) with SSL state SSLv3/TLS write client hello in HANDSHAKE[NOTICE] Closing no-longer-configured Socks listener on 127.0.0.1:9150[NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.[WARN] Pluggable Transport process terminated with status code 0
There's something bothering me here. Even if the user is unable to connect to any STUN servers and sends an SDP offer with no candidates, they should still be able to connect to proxies that are not behind a NAT or behind a full cone NAT, regardless of what kind of NAT they have. The reason behind this is that if the proxy receives a binding request user message from the client, it will "learn" the client's candidate from the source address of the request and their binding request success response will contain an XOR-MAPPED-ADDRESS field with the client's candidate back to the client. So in general, the connection will look like this:
You'll see a lot of datachannel timeouts like in the log shared above, because there are restricted cone NATs in the proxy pool for clients with symmetric or unknown NAT types. But the client should eventually find a proxy without a NAT or with a full cone NAT. I don't know what the ratio or NAT types are in the "unrestricted" proxy pool, but the fact that clients aren't ever able connect is suspicious.
I wonder if STUN is being blocked by protocol rather than port. If the binding request user messages aren't going through to each peer, then the webrtc connection won't be attempted. Other possibilities are that the proxies are being enumerated (unlikely, I think), or that DTLS is being blocked.
If it really is the case that clients just aren't getting full cone or un-NAT'd proxies, we could introduce another pool at the broker given preferentially to clients without any SDP candidates in their offer.
If STUN is being blocked by protocol, perhaps tpo/anti-censorship/pluggable-transports/snowflake#40240 (closed) would be a useful fix. If DTLS is being blocked, perhaps we can circumvent that blocking by adjusting the fingerprint or adding another obfuscation layer. If proxies are being enumerated, the fix will be a lot more complicated.
I forgot to add: most of the proxies without NATs or with full cone NATs are probably run on large hosting providers. So it could be the case that all of the proxies that should work, even if the client can't connect to STUN servers, don't because they are in IP ranges that are blocked wholesale.
So perhaps what we need are proxies on full cone NATs on home networks, but filtering these out to give to users in TM would be difficult.
I wonder if STUN is being blocked by protocol rather than port.
Doesn't seem so. I just set up port redirection from the unblocked VPS IP port 80 to a public STUN server, and tried to use it from AGTS and Turkmentelecom — it works.
I can't say for all of Turkmenistan users in different regions, but according to the probes in Ashgabat which I have, you can hardly call their network access as "an internet". Out of 6000+ Tor Relays, only about 50 are reachable, most of which are set up on residential connections in Europe or Canada, and sometimes you might see a relay on an (yet) not blocked hosting address.
And this is not a targeted Tor block, this is just how Turkmenistan blocks IP ranges. If you try typing innocent query to the search engine, like "how to cook", you'd be lucky if 3 search results out of 20 would open.
Both AGTS and Turkmentelecom are blocking all of our STUN servers as well as most large hosting providers. We don't think they are blocking Snowflake by protocol anywhere, and we can successfully get a connection to the broker via domain fronting.
While STUN isn't necessary for a client to use Snowflake, in the case of TM it practically is because most of the Snowflakes that work for clients without candidates in their SDP are run on large hosting providers. So it's possible that if we found a way for clients to make a connection to a STUN server, that would "unlock" the Snowflake proxies that are being run on residential IP ranges.
@ValdikSS in your opinion, is it worth it to try and find a way to run a STUN server that clients in TM can get access to? If running it on most VPS providers doesn't work, what about the following:
run a STUN server on a residential connection in US or CA
run a STUN server from a hosting provider in TM or RU (this might be risky to the operator however)
I just set up port redirection from the unblocked VPS IP port 80 to a public STUN server, and tried to use it from AGTS and Turkmentelecom
Could this be a viable way forward? Or is this unblocked VPS just used for measurements and too risky to be used for censorship circumvention?
What I'm unsure about is whether this provides more value than the existing call to run obfs4 relays on residential connections. From what I understand, Snowflake will still be strictly worse in terms of reliability and performance than an obfs4 server run from a residential (unblocked) IP range.