- [tor-dev] A simple HTTP transport and big ideas\ https://lists.torproject.org/pipermail/tor-dev/2014-January/006159.html
Download Tor Browser or Tor Messenger: https://www.torproject.org/download/download-easy.html\\ https://trac.torproject.org/projects/tor/wiki/doc/TorMessenger Extract and run it, and then configure these settings:
- Configure on the first screen.
- Check Tor is censored in my country, then Select a built-in bridge, then choose meek-amazon or meek-azure. If one doesn't work, try the other.
- Click Connect.
Howtos in other languages:
To build from source:
git clone https://git.torproject.org/pluggable-transports/meek.git cd meek/meek-client export GOPATH=~/go go get go build tor -f torrc
FreeBSD port: http://www.freshports.org/security/meek/
meek uses a technique called "domain fronting" to send a message to a Tor relay in a way that is hard to block. Domain fronting is the use of different domain names at different communication layers. The meek-client program builds a special HTTPS request and sends it to an intermediate web service with many domains behind it, such as a CDN. What's special about the request is that one domain name (the "front domain") appears on the "outside" of the request—in the DNS query and SNI—and a different name appears on the "inside"—in the HTTP Host header. The censor sees the outside name but the CDN sees the inside name, and forwards the request to the meek-server program running on a Tor bridge. meek-server decodes the body of the request and feeds the data into Tor.
[[span([meek-diagram.svg (SVG source)], style=font-size:80%)]]
How to change the front domain
You can change the front domains used by the default bridge lines. The default bridge lines can be found at:
- Browser/TorBrowser/Data/Browser/profile.default/preferences/extension-overrides.js inside Tor Browser
Copy a bridge line and change the
front=part to another domain on the same CDN.
Other domain fronting systems
meek is just one of several circumvention systems using domain fronting. You can read about the technique in general here.
FireFly Proxy is a meek-like proxy implemented in Python. It is designed against the Great Firewall of China.
Here are some web services that support domain fronting. We have been testing potential fronting services mostly through manual testing and Wget commands.
Not all of the listed services are deployed. The ones you can currently use with Tor are:
See also GreatFire.org's list of mirrors, which, while they aren't using domain fronting, are hosted on the same kind of high-collateral-damage services. sitescanner automatically tests domain names for CloudFlare support.
$ wget -q -O - https://a0.awsstatic.com/ --header 'Host: d2zfqthxsdq309.cloudfront.net' I’m just a happy little web server.
CloudFront is a CDN. Your files are hosted on a generated domain name that looks like d2k1ftgv7pobq7.cloudfront.net. All these domains support HTTPS with a wildcard cert for *.cloudfront.net, and they can front for each other.
There is a free tier, good for a year, that limits you to 50 GB per month. Per-request pricing differs by client country. Per-gigabyte costs go down the more you transfer, with a maximum of $0.19 per gigabyte. Bandwidth costs to the origin server (i.e., the Tor bridge) are lower. There's an additional cost of about $0.01 per 10,000 requests.
CloudFront allows you to use your own TLS domain name for an extra charge, but that appears to put you on a certificate with a bunch of shared SANs, which can't front for domains on different certificates.
The FAQ suggests that non-cacheable, dynamic traffic is fine. Q. Does Amazon CloudFront support delivery of dynamic content? Amazon CloudFront supports all files that can be served over HTTP. This includes dynamic web pages, such as HTML or PHP pages, any popular static files that are a part of your web application, such as website images, audio streams, video streams, media files or software downloads. For on-demand media files, you can also choose to stream your content using RTMP delivery. Amazon CloudFront also supports delivery of live media over HTTP. Q. Does Amazon CloudFront cache POST responses? Amazon CloudFront does not cache the responses to POST, PUT, DELETE, OPTIONS, and PATCH requests – these requests are proxied back to the origin server.
There's a question of what to use as the front domain. Any particular *.cloudfront.net name could be individually blockable. The generic names cloudfront.net and www.cloudfront.net don't resolve. Maybe pick one with a lot of collateral damage? Or a few, and randomly choose between them? Or connect to an IP, rather than a domain (#12208 (moved)). Alexa has a list of the most popular cloudfront.net domains ("Where do visitors go on cloudfront.net?"), which starts out:
d3dsacqprgcsqh.cloudfront.net 14.67% deayhd4nq31b0.cloudfront.net 6.06% d396qusza40orc.cloudfront.net 2.72% d3v9w2rcr4yc0o.cloudfront.net 2.26% d13yacurqjgara.cloudfront.net 2.09%
There's a list of CNAMES that point to an example cloudfront.net subdomain. It appears that GFW blacklists (through DNS poisoning) *.cloudfront.net, but some names are whitelisted including d3dsacqprgcsqh.cloudfront.net and d1y9yo7q4hy8a7.cloudfront.net (9gag). GreatFire.org has a list of blocked cloudfront.net subdomains.
Here are instructions on setting up CloudFront. Read http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GettingStarted.html. Skip step 2, which is about uploading your files to S3 (all our data comes straight from the Tor relay). Change settings as follows:
Origin Domain Name: the domain where meek-server is running. You can use
- Origin ID: doesn't matter.
- Origin SSL Protocols: TLSv1.2 only
- Origin Protocol Policy: HTTPS Only
- HTTPS Port: change this if you are running meek-server on a port other than 443.
- Viewer Protocol Policy: HTTPS Only
- Allowed HTTP Methods: GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE. It won't work without this (specifically POST is needed).
- SSL Certificate: Default CloudFront Certificate (*.cloudfront.net)
- Supported HTTP Versions: HTTP/2, HTTP/1.1, HTTP/1.0
You will get a domain name like d111111abcdef8.cloudfront.net. Wait about 15 minutes for it to start to resolve. Set up torrc like so:
ClientTransportPlugin meek exec ./meek-client --url=https://d111111abcdef8.cloudfront.net/ --log meek-client.log
You can front with a different *.cloudfront.net domain.
ClientTransportPlugin meek exec ./meek-client --url=https://d111111abcdef8.cloudfront.net/ --front=d36cz9buwru1tt.cloudfront.net --log meek-client.log
This section last updated 2018-04-30
$ wget -q -O - https://ajax.aspnetcdn.com/ --header 'Host: meek.azureedge.net' I’m just a happy little web server.
Azure is a cloud computing platform with a CDN. The CDN services are actually provided by Verizon or Akamai.
Pricing is $0.09 to $0.25 per GB (depending on geographical region), getting less for higher volumes.
When you choose to use the Verizon CDN, you get a domain of the form subdomain.azureedge.net, where you get to choose subdomain. Formerly, you got an uncontrollable subdomain of vo.msecnd.net. ajax.aspnetcdn.com might be a good front. I've also seen azurecomcdn.net.
- HTTPS Everywhere rules for msecnd.net. List of fronting-capable Azure domains (2017-07-24):
- Finding Domain frontable Azure domains (archive)
- known-good.txt (archive)
- Log in at https://portal.azure.com/.
- Click "All services" in the sidebar, type "cdn" in the search box, and select "CDN profiles".
- Click "+ Add" to create a CDN profile. (You only have to do this the first time you create an endpoint.)
- Name: doesn't matter.
- Resource group: "Create new" or "Use existing" doesn't matter, I think it's just an accounting thing.
- Resouce group location: doesn't matter, only controls "where the metadata associated with the CDN profile will reside".
- Pricing tier: Standard Verizon. Standard Akamai may work too, haven't tried it.
- Select the CDN profile and click "+ Endpoint".
- Name: doesn't matter; this will become your azureedge.net subdomain.
- Origin type: Custom origin.
- Origin hostname: the domain name of your meek-server bridge.
- Origin path: blank
- Origin host header: same as origin hostname.
- Uncheck HTTP, check HTTPS.
- Optimized for: General web delivery.
After about an hour, the CDN will start forwarding. However, you will get "502 Bad Gateway" errors because by default, the Azure CDN does not use TLS SNI towards the origin. You have to ask them to enable it. (They expect you to have a one-hostname-per-IP-address setup that doesn't require SNI.) meek-server's built-in Let's Encrypt support (
--acme-hostnames) requires SNI. Your options are to get a certificate manually and use the
--key options; or to open a support request and ask them to enable SNI, which takes about one week.
$ wget --no-check-certificate -q -O - https://a248.e.akamai.net/ --header 'Host: www.nytimes.com' | grep -io '<title>.*</title>' <title>The New York Times - Breaking News, World News & Multimedia</title> $ wget --no-check-certificate -q -O - https://a248.e.akamai.net/ --header 'Host: www.pinterest.com' | grep -io '<title>.*</title>' <title>Pinterest</title> (However these don't work for some reason; they go to the SNI name.) $ wget --no-check-certificate -q -O - https://www.nytimes.com/ --header 'Host: www.pinterest.com' | grep -io '<title>.*</title>' <title>The New York Times - Breaking News, World News & Multimedia</title> $ wget --no-check-certificate -q -O - https://www.pinterest.com/ --header 'Host: www.nytimes.com' | grep -io '<title>.*</title>'
(I use --no-check-certificate because the certificate isn't trusted by Wget, but it's okay in Firefox.)
Akamai is a CDN.
HTTPS Everywhere rule for akamai.net. I don't know what's so special about the a248.e.akamai.net name. For example, a247 and a249 exist, but the certificate they serve is only good for ".akamaihd.net", ".akamaihd-staging.net", and "a248.e.akamai.net". The paper "Fast Internet Content Delivery with FreeFlow" describes the structure of Akamai URLs; some of it is driven by historical use when browsers didn't send Host or SNI.
The a248.e.akamai.net name started being blocked (DNS poisoned) in China in late September 2014: https://en.greatfire.org/https/a248.e.akamai.net. (See also https://en.greatfire.org/search/all/akamai.net for all akamai.net domains.)
It might be easier and cheaper to get Akamai through a reseller. For example Liquid Web posts a price list, $100/month for up to 1000 GB. This blog post describes how to use WordPress with the Liquid Web CDN. In that example they use a custom CNAME, cdn.lw.rrfaae.com, which for me has the reverse DNS a1711.g1.akamai.net. I can grab an HTTPS version of the blog while fronting through a248.e.akamai.net:
$ wget --no-check-certificate -q -O - https://a248.e.akamai.net/ --header 'Host: cdn.lw.rrfaae.com' | grep -io '<title>.*</title>' <title>jgillman's Liquid Web Update</title>
However, Liquid Web's terms of service prohibit proxy servers: We do not allow proxy servers of any kind, whether for personal or business use. Files with references to any proxy or likeness thereof are prohibited.
$ wget --no-check-certificate https://a248.e.akamai.net/CloudFiles%20Akamai.pdf --header 'Host: c186397.ssl.cf1.rackcdn.com'
However, the CDN only works for static files hosted through Cloud Files. They don't support the "origin pull" service we need.
HP Cloud uses Akamai. But they have the same problem as Rackspace: it's only static files from HP Cloud Object Storage.
You can get an idea of some of their domains by looking at the certificate for https://global.ssl.fastly.net/. Shared SSL hosting appears to be on subdomains of a.ssl.fastly.net, global.ssl.fastly.net, or hosts.fastly.net.
$ wget https://github.a.ssl.fastly.net/favicon.ico Resolving github.a.ssl.fastly.net (github.a.ssl.fastly.net)... 220.127.116.11 HTTP request sent, awaiting response... 200 OK $ wget https://a.ssl.fastly.net/favicon.ico --header 'Host: github.a.ssl.fastly.net' Resolving a.ssl.fastly.net (a.ssl.fastly.net)... 18.104.22.168 HTTP request sent, awaiting response... 400 Bad Request $ wget --no-check-certificate https://22.214.171.124/favicon.ico --header 'Host: github.a.ssl.fastly.net' The certificate's owner does not match hostname ‘126.96.36.199’ HTTP request sent, awaiting response... 200 OK
Pricing is a minimum $50 per month, and $0.12–0.19 per GB for the first 10 TB per month. There's an additional charge per 10,000 requests.
Level 3 is a tier-1 network operator and also has a CDN.
VPS.NET is a reseller of the Level 3 CDN (formerly they had a deal with Akamai). Pricing is pay-as-you-go, not per-month; in other words we can buy a TB and not pay more until it's used up. The first TB is $35 and after that it's $250.
CloudVPS is another reseller. There's no extra charge over the normal VPS fee, but they say: "The maximum free throughput of the CDN is 100 Megabit per second (Mbit/sec). Traffic above 100 Mbit/sec will be billed at our normal traffic pricing. Contact us if you plan to use the CDN for large amounts of traffic." "The free CloudVPS CDN cannot be used for SSL delivery. Contact us if you want to speed up SSL traffic using the CDN."
It's not clear yet whether fronting works. I found some customer domains from http://trends.builtwith.com/websitelist/Level3-CDN, but I couldn't make them work.
Level 3 is suspected of collaborating with the NSA, so there's that.
Level 3's CDN naming seems to revolve around the footprint.net domain. While HTTP requests do appear to be fronted, attempts to retrieve content from other hosts over SSL were unsuccessful. An example can be found with:
openssl s_client -servername www.feelunique.com -tlsextdebug -msg -connect www.warface.com:443 GET / HTTP/1.1 Host: www.feelunique.com HTTP/1.1 403 Forbidden Server: Footprint 4.10/FPMCP Mime-Version: 1.0 Date: Sun, 24 Aug 2014 21:59:00 GMT Content-Type: text/html Content-Length: 526 Expires: Sun, 24 Aug 2014 21:59:00 GMT Connection: close ...
Warface.com's certificate is returned, but we see a Footprint originating error of "Invalid Protocol." Tried this with a few domains under Level 3, to no avail.
Despite that domain fronting seems not to work, we might be able to get the same effect from the URL structure of the secure.footprint.net domain. For example, there is a Free Weibo mirror at https://secure.footprint.net/pingfan/fw. It appears we can get a path under the secure.footprint.net domain. secure.footprint.net is currently DNS poisoned by GFW. doesn't work (HTTP 403) as of 2015-08-28.
Netlify is a CDN and static-content host. Domain fronting appears to be supported with no configuration necessary. It would not be possible to run Tor on the Netlify infrastructure and a potential "meek-netlify" would require a backend to talk to. From the basic plan ($9/month) and up, API proxying is supported. There does not appear to be any bandwidth-based billing, only a fixed monthly cost. SSL on Netlify is a free service with certificates provisioned by Lets Encrypt.
A proof-of-concept has been built, but has not been load tested:
curl https://netlify.com/meek/ -H 'Host: iain.learmonth.me' I’m just a happy little web server.
The configuration is rather simple, in a file named "_redirects":
/* https://meek-server.backend/:splat 200
See #27579 (moved).
$ curl -s https://www.cdn77.com/ -H 'Host: www.phpmyadmin.net' | grep '<title>' <title>phpMyAdmin</title>
See whether these services support fronting or not.
HostGator et al.?
Cheap web hosts like HostGator sometimes offer shared SSL. For example HostGator puts you on a name like secure123.hostgator.com. You can probably front through those. In this case, you would run a PHP reflector (#10984 (moved)) on the web host in order to reach a relay.
GreatFire has some mirrors on EdgeCast, for example https://edgecastcdn.net/00107ED/g/.
Starting November 12, 2014, edgecastcdn.net is blocked by GFW. https://en.greatfire.org/edgecastcdn.net https://twitter.com/GreatFireChina/status/533318145118048256
Web services that appear not to work
Someone tried these and it looks like the domain fronting trick doesn't work.
Google App Engine
Google App Engine is web application hosting on Google's infrastructure.
Google App Engine used to work for domain fronting, but Google disabled it on April 13.
CloudFlare is a CDN. You use your own domain name. TLS is terminated at CloudFlare's server.
There are different pricing plans. The cheapest one that supports SSL is Pro, for $20 per month. Business is $200 and Enterprise averages $5,000. There's no per-gigabyte bandwidth charge.
CloudFlare now matches the SNI and Host header when both exist.
CloudFlare used to work for domain fronting, but does not anymore since September 2015 (comment:2:ticket:14256).
How to run a meek-server (bridge)
Compile the program using
Update your torrc file. There's a sample at /meek-server/torrc.
To test your bridge on the client side, you can add a line like this to your torrc:
Bridge meek 0.0.2.0:3 url=http://my-bridge.example.com:7002/
If you're running more than one transport, you need a separate tor process for each to avoid user counting confusion. See https://lists.torproject.org/pipermail/tor-dev/2014-September/007480.html and [#Users] for more information.
If meek doesn't work and you get a log message like this: NOTICE: Bridge at '0.0.2.0:1' isn't reachable by our firewall policy. Skipping. then you should unset the ReachableAddresses and FascistFirewall settings in your Tor configuration. These options don't understand the dummy addresses used in meek bridge lines. See comment:4:ticket:18611 for more information.
Monthly cost summary emails.
|= 2014 =||Aug||Sep||Oct||Nov||Dec|
|= 2015 =||Jan||Feb||Mar||Apr||May||Jun||Jul||Aug||Sep||Oct||Nov||Dec|
|= 2016 =||Jan||Feb||Mar||Apr||May||Jun||Jul||Aug||Sep||Oct||Nov||Dec|
|= 2017 =||Jan||Feb||Mar|
(Note: I have started adding the costs from 4/1/2017, and will keep this page updated monthly, firstname.lastname@example.org)
span(style=color:gray,$)2014 totalspan(style=color:gray,$)2015 totalspan(style=color:gray,$)2016 totalspan(style=color:gray,$)2017 totalspan(style=color:gray,—)2018 totalspan(style=color:gray,—)grand totalspan(style=color:gray,$)
Related to domain fronting.
- Blocking-resistant communication through domain fronting: Describes the technique and the experience of deployment.
- Seeing through Network-Protocol Obfuscation: Builds classifiers for meek, obfs3, obfs4, and FTE, and evaluates them against large traffic traces.
- Towards Measuring Unobservability in Anonymous Communication Systems (Chinese): Evaluates certain traffic features (packet size and timing) of meek and vanilla Tor, and compares them to a known non-circumvention trace using relative entropy.
- Decoy routing is a related idea.
Barriers to indistinguishability
- TLS ciphersuites\ Look like a browser. #4744 (moved) has the story of when tor changed its ciphersuite list to look like Firefox's in 2012. tor's list of ciphers is in [https://gitweb.torproject.org/tor.git/tree/src/common/ciphers.inc?id=89c16890095d63cc6f56a378108efc3d3f063204 src/common/ciphers.inc].
- TLS extensions\ Look like a browser.
- Packet lengths\ Do something to break up fixed-length cells.
- Interpacket times
- Upstream/downstream bandwidth ratio
- Polling intervalImage(meek-0.1-network-history.png)
- Maximum payload lengths\ Payloads are limited to 65536 bytes. During bootstrapping and bulk downloads, a lot of bodies have exactly this size.
- Behavior on random drops\ Suppose the censor drops every hundredth connection to https://www.google.com/. Normal web users will just refresh; meek's stream will be broken.
- Number of simultaneous requests\ Browsers open many parallel connections to the same server; I think meek 0.4 opens just one.
- Extra latency\ The latency between the client and the front domain is likely to be measurably different from the latency between the client and the real destination. Working in our advantage is that we are likely to be transporting web traffic, so we inherit some of its traffic characteristics.
How to look like browser HTTPS
We decided to use a browser extension to make all the HTTPS requests required by meek, so that the requests look just like those made by a browser. There's an extension [ticket:11183 for Firefox] (which works with Tor Browser, so it can work in the browser bundle without shipping a second browser) and one [ticket:11393 for Chrome]. The list below is a summary of a discussion that took place on the tor-dev mailing list and on IRC.
Sample client hellos
The word "meek" should be written in lower case, even when it is the first word in a sentence. Exception: when it is the last word in a sentence, it should be in ALL CAPS. When printed on glossy paper, the word should be followed by a ™ symbol; when handwritten, decisively underlined. Exception to everything: if it is the _n_th appearance of "meek" in a document, and n is the description number of a non-halting Turing machine, then write "𝕸𝕰𝕰𝕶" in honor of Alan Turing and/or Sublime.