{"id":16110731,"url":"https://github.com/ravenexp/crates-io-proxy","last_synced_at":"2026-03-14T09:09:12.628Z","repository":{"id":57611949,"uuid":"405967285","full_name":"ravenexp/crates-io-proxy","owner":"ravenexp","description":"Caching HTTP proxy server for the `crates.io` registry","archived":false,"fork":false,"pushed_at":"2025-02-15T09:47:22.000Z","size":76,"stargazers_count":28,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T00:40:47.059Z","etag":null,"topics":["cache","cargo","crates","proxy","registry"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ravenexp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-09-13T12:37:55.000Z","updated_at":"2025-04-25T05:55:34.000Z","dependencies_parsed_at":"2022-08-27T09:50:22.706Z","dependency_job_id":"c8719b39-cd19-4a54-847a-d8c4925919f6","html_url":"https://github.com/ravenexp/crates-io-proxy","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"3c9b7056db0681567309b4e05d059acc07a40917"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravenexp%2Fcrates-io-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravenexp%2Fcrates-io-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravenexp%2Fcrates-io-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravenexp%2Fcrates-io-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravenexp","download_url":"https://codeload.github.com/ravenexp/crates-io-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902614,"owners_count":21822261,"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":["cache","cargo","crates","proxy","registry"],"created_at":"2024-10-09T19:39:19.698Z","updated_at":"2026-03-14T09:09:07.606Z","avatar_url":"https://github.com/ravenexp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Caching HTTP proxy server for the `crates.io` registry\n======================================================\n\nIntroduction\n------------\n\n`crates-io-proxy` implements transparent caching for both\nthe sparse registry index at \u003chttps://index.crates.io/\u003e and\nthe static crate file download server.\n\nTwo independent HTTP proxy endpoints are implemented:\n\n1. Listens to HTTP GET requests at `/index/.../{crate}`,\n   forwards them to \u003chttps://index.crates.io/\u003e and caches the downloaded registry\n   index entries as JSON text files on the local filesystem.\n\n2. Listens to HTTP GET requests at `/api/v1/crates/{crate}/{version}/download`,\n   forwards them to \u003chttps://crates.io/\u003e and caches the downloaded crates as\n   `.crate` files on the local filesystem.\n\nSubsequent sparse registry index and crate download API hits are serviced\nusing the locally cached index entry and crate files.\n\nAs a convenience feature, the download requests for the `config.json` file\nfound at the sparse index root are served with a replacement file,\nwhich changes the crate download URL to point to this same proxy server.\n\nUsage\n-----\n\nCargo can be told to use the crate registry mirror by using the source\nreplacement feature. Add the following lines to your `.cargo/config`:\n\n```\n[source.crates-io]\nreplace-with = \"crates-io-mirror\"\n\n[registries.crates-io-mirror]\nindex = \"sparse+http://crates-io-proxy.example.com:3080/index/\"\n```\n\nUsing static git index mirror\n-----------------------------\n\n`crates-io-proxy` can also be used as the crate file download proxy server\nwith a separate git-based registry index.\n\nTo use this configuration, clone and rehost the [crates.io index] repository\nfrom GitHub and change `\"dl\"` parameter in `config.json` file in\nthe repository root to point to the `crates-io-proxy` server instead:\n\n```\n{\n    \"dl\": \"https://crates-io-proxy.example.com:3080/api/v1/crates\",\n    \"api\": \"https://crates.io\"\n}\n```\n\nIn this configuration, the git registry index link should be used instead:\n\n```\n[registries.crates-io-mirror]\nindex = \"https://crates-io-index.example.com/crates-io-index.git\"\n```\n\nConfiguration\n-------------\n\nThe proxy server can be configured by either command line options\nor environment variables.\n\nRun `crates-io-proxy --help` to get the following help page:\n\n```\nUsage:\n    crates-io-proxy [options]\n\nOptions:\n    -v, --verbose              print more debug info\n    -h, --help                 print help and exit\n    -V, --version              print version and exit\n    -L, --listen ADDRESS:PORT  address and port to listen at (0.0.0.0:3080)\n        --listen-unix PATH     Unix domain socket path to listen at\n    -U, --upstream-url URL     upstream download URL (https://crates.io/)\n    -I, --index-url URL        upstream index URL (https://index.crates.io/)\n    -S, --proxy-url URL        this proxy server URL (http://localhost:3080/)\n    -C, --cache-dir DIR        proxy cache directory (/var/cache/crates-io-proxy)\n    -T, --cache-ttl SECONDS    index cache entry Time-to-Live in seconds (3600)\n\nEnvironment:\n    INDEX_CRATES_IO_URL        same as --index-url option\n    CRATES_IO_URL              same as --upstream-url option\n    CRATES_IO_PROXY_URL        same as --proxy-url option\n    CRATES_IO_PROXY_CACHE_DIR  same as --cache-dir option\n    CRATES_IO_PROXY_CACHE_TTL  same as --cache-ttl option\n```\n\nAdvanced configuration\n----------------------\n\nBy default, `crates-io-proxy` uses embedded TLS trusted root certificates.\nIt is possible to configure it to use the system certificate store\nat the build time by setting the `native-certs` feature flag.\n\nConfiguring this behavior at the run time is not supported yet.\n\n[crates.io index]: https://github.com/rust-lang/crates.io-index\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravenexp%2Fcrates-io-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravenexp%2Fcrates-io-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravenexp%2Fcrates-io-proxy/lists"}