{"id":18395259,"url":"https://github.com/lpardue/edge-tools-ietf","last_synced_at":"2025-04-12T13:43:32.661Z","repository":{"id":77554891,"uuid":"295587963","full_name":"LPardue/edge-tools-ietf","owner":"LPardue","description":"I pity the tools!","archived":false,"fork":false,"pushed_at":"2021-05-17T01:18:16.000Z","size":84,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-16T02:18:21.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LPardue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-15T02:04:54.000Z","updated_at":"2022-08-26T17:59:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"65d630d3-75dd-46ad-bab9-92213944eb7c","html_url":"https://github.com/LPardue/edge-tools-ietf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LPardue%2Fedge-tools-ietf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LPardue%2Fedge-tools-ietf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LPardue%2Fedge-tools-ietf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LPardue%2Fedge-tools-ietf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LPardue","download_url":"https://codeload.github.com/LPardue/edge-tools-ietf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248574727,"owners_count":21127056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:08:38.774Z","updated_at":"2025-04-12T13:43:32.637Z","avatar_url":"https://github.com/LPardue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edge-tools-IETF\n\nSpeeding up access to resources on tools.ietf.org and www.rfc-editor.org.\n\nI pity the tools!\n\n\u003cimg src=\"https://github.com/LPardue/edge-tools-ietf/blob/main/pity.jpg\" width=\"100\"\u003e\n\n# Description\n\nA pretty simple Cloudflare Workers script to speed up access to resources on\ntools.ietf.org and www.rfc-editor.org. Any path on those domains should work.\n\nIn my experience, the first load time for an RFC document on tools.ietf.org is\nreduced from around 1.5 seconds down to 0.5 seconds). Subsequent loads are\nreduced further to 0.05 seconds.\n\nFor example, try measuring and comparing load time of\nhttps://tools.ietf.org/html/rfc7540 and\nhttps://tools-ietf-org.lucaspardue.com/html/rfc7540 with local caching disabled\nto see how much faster life can be when modern edge capabilities are harnessed.\n\n# Speeding up Internet-Draft Builds\n\nThe speed advantages are nice for humans but also work well for machines. For\ninstance, if you're using [Martin Thomson's I-D\nTemplate](https://github.com/martinthomson/i-d-template) then you'll be familiar\nwith turning source into IETF-formatted text, HTML or XML with\n\n\n```sh\n$ make\n```\n\nUnder the hood, citation metadata is automatically fetched and written into the\noutput. Some metadata is fetched from the Web using HTTP and so it suffers from\nslow access times. You can point the document generation instead at\nedge-tools-ietf by passing an environment variable\n\n```sh\n$ XML_RESOURCE_ORG_PREFIX=https://xml2rfc-tools-ietf-org.lucaspardue.com/public/rfc make\n```\n\nalternatively, you can also modify the same entry in your project's `config.mk`.\n\n# Converting Hosts\n\nFor now, the worker is hosted on my domain lucaspardue.com. To access these\nsites proxied by these workers, all you need to do is take a hostname, convert\nthe dots to hyphens and append lucaspardue.com. The follow table lists supported\nsubstitute hosts:\n\n| Original  | Substitute  |\n|---|---|\n| tools.ietf.org | tools-ietf-org.lucaspardue.com |\n| xml2rfc.tools.ietf.org | xml2rfc-tools-ietf-org.lucaspardue.com |\n| www.rfc-editor.org  | www-rfc-editor-org.lucaspardue.com  |\n\nMost paths on tools are probably supported but I've mainly focused on access to\nHTML versions of Internet-Drafts and RFCs. Chances are other stuff could act\nfunky, if so ping me and just fallback if needs be.\n\n# How it Works\n\nThere's not really much that is clever or custom going on. When a request hits\nthe worker, we check if the resource is stored in the edge cache. If it's not,\nwe check a small, always warm KV store and then promote that into cache.\nFinally, if there are two misses, we fetch from the origin and put it in cache.\n\nWe use the\n[Cache API](https://developers.cloudflare.com/workers/runtime-apis/cache),\n[KV API](https://developers.cloudflare.com/workers/runtime-apis/kv) and\n[Fetch API](https://developers.cloudflare.com/workers/runtime-apis/fetch).\n\nThe KV store is prepopulated using [Worker Cron Triggers](https://developers.cloudflare.com/workers/platform/cron-triggers).\n\nSince we're rewritting URLs, we need to tweak response payload a bit. We do this\ninline using the [HTMLRewriter API](https://developers.cloudflare.com/workers/runtime-apis/html-rewriter).\n\n## Status and Detail\n\nThis is still early days. The worker is hardcoded to do a lot of things and be\nhosted on lucaspardue.com. Future work should make the code more portable so\nothers can experiment more easily.\n\nTesting has been limited, so feature requests or bug reports are welcome.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpardue%2Fedge-tools-ietf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpardue%2Fedge-tools-ietf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpardue%2Fedge-tools-ietf/lists"}