{"id":43553972,"url":"https://github.com/m-lab/speed-proxy","last_synced_at":"2026-02-03T19:37:36.346Z","repository":{"id":333903137,"uuid":"1139208865","full_name":"m-lab/speed-proxy","owner":"m-lab","description":"Client-Integration Registration Token-Exchange Proxy Service","archived":false,"fork":false,"pushed_at":"2026-01-21T20:24:28.000Z","size":19,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-22T05:19:53.857Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.measurementlab.net/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-21T17:00:32.000Z","updated_at":"2026-01-21T18:26:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/m-lab/speed-proxy","commit_stats":null,"previous_names":["m-lab/speed-proxy"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/m-lab/speed-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fspeed-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fspeed-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fspeed-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fspeed-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-lab","download_url":"https://codeload.github.com/m-lab/speed-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fspeed-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29054873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-02-03T19:37:35.770Z","updated_at":"2026-02-03T19:37:36.341Z","avatar_url":"https://github.com/m-lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# speed-proxy\n\n[![Test](https://github.com/m-lab/speed-proxy/actions/workflows/test.yml/badge.svg)](https://github.com/m-lab/speed-proxy/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/m-lab/speed-proxy/badge.svg?branch=main)](https://coveralls.io/github/m-lab/speed-proxy?branch=main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/m-lab/speed-proxy)](https://goreportcard.com/report/github.com/m-lab/speed-proxy)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/m-lab/speed-proxy)](https://go.dev/)\n[![Go Reference](https://pkg.go.dev/badge/github.com/m-lab/speed-proxy.svg)](https://pkg.go.dev/github.com/m-lab/speed-proxy)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/m-lab/speed-proxy)\n\nIntegrator backend service for speed.measurementlab.net. This service acts as a\nsecurity boundary between the frontend client and M-Lab's token exchange\nservice.\n\n## Overview\n\nThe service provides a single endpoint that:\n\n1. Exchanges the M-Lab API key for a short-lived JWT token via M-Lab's token exchange service\n2. Returns the JWT to the frontend client\n\nThe frontend then uses this JWT to access M-Lab's Locate API at\n`/v2/priority/nearest`.\n\n## Configuration\n\n| Flag | Environment Variable | Default | Description |\n|------|---------------------|---------|-------------|\n| `-listen-addr` | `LISTEN_ADDR` | `:8080` | Address to listen on |\n| `-api-key` | `API_KEY` | (required) | M-Lab API key for token exchange |\n| `-token-exchange-url` | `TOKEN_EXCHANGE_URL` | `https://auth.mlab-sandbox.measurementlab.net/v0/token/integration` | URL of the token exchange service |\n| `-allowed-origin` | `ALLOWED_ORIGIN` | `https://speed.measurementlab.net` | Allowed CORS origin |\n\n## API\n\n### GET /v0/token\n\nReturns a JWT token for authenticating with M-Lab's Locate API.\n\n**Response:**\n```json\n{\n  \"token\": \"\u003cjwt-token\u003e\"\n}\n```\n\n### GET /health\n\nHealth check endpoint. Returns `200 OK` with body `ok`.\n\n## Deployment\n\n### Deploy to Cloud Run\n\n```bash\ngcloud run deploy speed-proxy \\\n  --source . \\\n  --region us-central1 \\\n  --set-env-vars \"API_KEY=mlabk.ki_xxx.secret\" \\\n  --allow-unauthenticated\n```\n\n## Local Development\n\n```bash\nAPI_KEY=\"mlabk.ki_xxx.secret\" go run . -allowed-origin=\"http://localhost:3000\"\n```\n\n## Docker\n\n```bash\n# Build\ndocker build -t speed-proxy .\n\n# Run\nexport API_KEY=\"mlabk.ki_xxx.secret\"\ndocker run -p 8080:8080 -e API_KEY speed-proxy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fspeed-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-lab%2Fspeed-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fspeed-proxy/lists"}