Consider support of static file distribution(like Tor cached states) over amp cache to allow full Tor bootstrap over amp cache
I have recently evaluated the option to serve static file over amp cache, which I believe, after various experiment, think it worth some discussion for its potential to allow Tor Pluggable transport using amp cache by closing the gap on the bootstrap issue. Currently, AMP cache, despite its ability to function in environment where only google sits are accessible, cannot be made into a pluggable transport due to the rate limiting imposed by google, which only allow 2-3/s origin fetch requests. This has limited its usefulness as Tor requires at least a few MB worth of data to be fetched to receive network status data, before it can start creating connections. As a result, it would take too long to transport this amount of data as as interactive stream. However, in a recent experiment, I find out that google amp cache has a different limit for cached requests of 100/s, as an result would allow an compressed Tor status of 5.11 MB to be downloaded in 4.3 second(, or a full Tor installer of 108.2 MB to be downloaded in 27 second), thus allow Tor status cache to be populated within a reasonable time, and allow a connection to be bootstrapped without cached state using only amp cache. <details> <summary>Rate Limit Experiment</summary> ``` ./cmd/ampcache-rate/ampcache-rate \ -server https://hacksaw-hammer.exe.xyz/ \ -resource-base https://hacksaw-hammer.exe.xyz/rate-test \ -origin-workers 16 \ -cached-workers 32 \ -cached-urls 4 \ -v ampcache-rate: 2026/06/19 21:51:51 payload=524288 encoded_font=525080 run_id=rate-20260619T205151-498546016Z ampcache-rate: 2026/06/19 21:51:51 starting origin-fetch-1s duration=1s workers=16 ampcache-rate: 2026/06/19 21:51:59 finished origin-fetch-1s started=16 success=16 in_window=0 failed=0 ampcache-rate: 2026/06/19 21:51:59 starting origin-fetch-1m duration=1m0s workers=16 ampcache-rate: 2026/06/19 21:53:03 finished origin-fetch-1m started=151 success=151 in_window=135 failed=0 ampcache-rate: 2026/06/19 21:53:03 preparing cached resource 1/4 url=https://hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000001.ttf ampcache-rate: 2026/06/19 21:54:00 preparing cached resource 2/4 url=https://hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000002.ttf ampcache-rate: 2026/06/19 21:54:59 preparing cached resource 3/4 url=https://hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000003.ttf ampcache-rate: 2026/06/19 21:55:55 preparing cached resource 4/4 url=https://hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000004.ttf ampcache-rate: 2026/06/19 21:56:53 starting cached-get-1s duration=1s workers=32 urls=4 ampcache-rate: 2026/06/19 21:56:54 finished cached-get-1s started=180 success=101 in_window=69 failed=79 ampcache-rate: 2026/06/19 21:56:54 starting cached-get-1m duration=1m0s workers=32 urls=4 ampcache-rate: 2026/06/19 21:57:54 finished cached-get-1m started=9556 success=6102 in_window=6070 failed=3454 run: rate-20260619T205151-498546016Z server: https://hacksaw-hammer.exe.xyz/ resource base: https://hacksaw-hammer.exe.xyz/rate-test payload bytes: 524288 encoded font bytes: 525080 payload sha256: a3d6b725295cdf9a6d3d99e2b4d85188b13be0ae04e1f742dae460c1f5862861 origin-fetch-1s kind: origin-fetch window: 1s workers: 16 started: 16 succeeded in window: 0 (0.00/s) succeeded total: 16 (1.93/s over elapsed) failed: 0 elapsed: 8.296s bytes read: 29136 statuses: 404 Not Found: 16 origin-fetch-1m kind: origin-fetch window: 1m0s workers: 16 started: 151 succeeded in window: 135 (2.25/s) succeeded total: 151 (2.39/s over elapsed) failed: 0 elapsed: 1m3.243s bytes read: 274971 statuses: 404 Not Found: 151 cached-get-1s kind: cached-get window: 1s workers: 32 started: 180 succeeded in window: 69 (69.00/s) succeeded total: 101 (72.53/s over elapsed) failed: 79 elapsed: 1.392s bytes read: 53183028 statuses: 200 OK: 101 404 Not Found: 14 429 Too Many Requests: 36 errors: Get "https://hacksaw--hammer-exe-xyz.cdn.ampproject.org/r/s/hacksaw-hammer.exe.x: 29 not_found_404: 14 rate_limited_429: 36 sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found cached-get-1m kind: cached-get window: 1m0s workers: 32 started: 9556 succeeded in window: 6070 (101.17/s) succeeded total: 6102 (101.50/s over elapsed) failed: 3454 elapsed: 1m0.119s bytes read: 3210673550 statuses: 200 OK: 6102 404 Not Found: 17 429 Too Many Requests: 1876 errors: Get "https://hacksaw--hammer-exe-xyz.cdn.ampproject.org/r/s/hacksaw-hammer.exe.x: 1561 not_found_404: 17 rate_limited_429: 1876 sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 404 Not Found sample error: cache returned 429 Too Many Requests sample error: cache returned 429 Too Many Requests sample error: cache returned 429 Too Many Requests sample error: cache returned 429 Too Many Requests prepared cached URLs: https://hacksaw--hammer-exe-xyz.cdn.ampproject.org/r/s/hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000001.ttf https://hacksaw--hammer-exe-xyz.cdn.ampproject.org/r/s/hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000002.ttf https://hacksaw--hammer-exe-xyz.cdn.ampproject.org/r/s/hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000003.ttf https://hacksaw--hammer-exe-xyz.cdn.ampproject.org/r/s/hacksaw-hammer.exe.xyz/rate-test/rate-20260619t205151-498546016z/cached-seed-00000004.ttf ``` </details> <details> <summary>Download Tor Browser over AMP Cache Log</summary> ``` ampcache: 2026/06/29 16:09:23 get-file: attempt=1 complete after=27.88s tor-browser-windows-x86_64-portable-15.0.16.exe file bytes: 113521152 cache body bytes: 133186003 (1.173x over file) manifest: 2080 bytes in 2 responses symbols: 133183923 bytes in 314 responses decoded payload bytes: 124015958 font encoding overhead: 9170045 bytes (7.39% overhead, 1.074x encoded/decoded) manifest font overhead: 1566 bytes (304.67% overhead) symbol font overhead: 9168479 bytes (7.39% overhead, 1.074x encoded/decoded) fec symbols: source=217 fetched_ok=217 attempted=348 failed=131 available=272 fec recovery overhead: 1.000x fetched/source, 0.798x fetched/available real 0m27.905s user 0m10.638s sys 0m1.419s ``` </details> [Machine Assisted Design Document](https://github.com/xiaokangwang/ai_generated_jk67h82o1rztv8zgtaw4za1u24ssz6k7be4f/blob/dev-ampfilestore-5g78lwr2std8sgdnhkxzuiglfmoewi5fk6d5/docs/ampcache-file-distribution-design.md)
issue