{"id":31664004,"url":"https://github.com/powerpuffpenguin/envoy-xds","last_synced_at":"2026-04-20T14:02:15.851Z","repository":{"id":315277130,"uuid":"1058587439","full_name":"powerpuffpenguin/envoy-xDS","owner":"powerpuffpenguin","description":"Use typescript to simplify the use of envoy xDS","archived":false,"fork":false,"pushed_at":"2025-09-26T10:03:02.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T00:40:59.100Z","etag":null,"topics":["cli","deno","envoy","envoy-xds","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/powerpuffpenguin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-09-17T09:34:08.000Z","updated_at":"2025-09-26T10:03:05.000Z","dependencies_parsed_at":"2025-09-17T18:51:48.820Z","dependency_job_id":"2f3701ad-a716-47a8-90e8-5fd1c49f91e0","html_url":"https://github.com/powerpuffpenguin/envoy-xDS","commit_stats":null,"previous_names":["powerpuffpenguin/envoy-xds"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/powerpuffpenguin/envoy-xDS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerpuffpenguin%2Fenvoy-xDS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerpuffpenguin%2Fenvoy-xDS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerpuffpenguin%2Fenvoy-xDS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerpuffpenguin%2Fenvoy-xDS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/powerpuffpenguin","download_url":"https://codeload.github.com/powerpuffpenguin/envoy-xDS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerpuffpenguin%2Fenvoy-xDS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32050451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cli","deno","envoy","envoy-xds","typescript"],"created_at":"2025-10-07T20:53:08.938Z","updated_at":"2026-04-20T14:02:15.841Z","avatar_url":"https://github.com/powerpuffpenguin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# envoy-xDS\n\nUse typescript to simplify the use of envoy xDS\n\n- [Overview](#Overview)\n- [Example](#Example)\n- [Init](#Init)\n\n# Overview\n\nenvoy-xDS is a powerful command-line tool built with Deno, designed to simplify\nthe management of Envoy proxies in non-Kubernetes environments. Instead of\nrunning a continuous control plane server, this project allows you to define\nyour Envoy configuration in Deno scripts. When executed, these scripts use a\nlocal API to generate Envoy configuration files and strategically place them to\ntrigger Envoy's hot reloading mechanism.\n\nThis approach provides the benefits of dynamic configuration without the\ncomplexity of a persistent gRPC server. It's an ideal solution for single-server\nsetups, personal projects, or any scenario where you want programmatic control\nover Envoy without the overhead of a full-fledged service mesh.\n\nFeatures Scripted Configuration: Define your Envoy listeners, routes, and\nclusters using familiar Deno/TypeScript.\n\nNo Service Required: The tool generates static xDS configuration files. No need\nto run a continuous gRPC server or manage long-running processes.\n\nLightweight \u0026 Minimalist: Built with Deno, the tool is a single, self-contained\nexecutable with no heavy dependencies.\n\nHot Reloading: Automatically triggers Envoy to load the new configuration by\nwriting to a designated file system path, making updates seamless.\n\nNo Kubernetes Required: Specifically designed for scenarios where a full-blown\nservice mesh is overkill, such as personal servers or virtual machines.\n\nHow It Works Define Your Configuration: You write a Deno script using the\nenvoy-xDS API to programmatically define your Envoy configuration.\n\nGenerate \u0026 Update: You run the Deno script from your terminal. The script's API\ncalls will generate the necessary Envoy configuration files (e.g.,\nlistener.yaml, route.yaml, etc.) and save them to a specified directory.\n\nEnvoy Hot Reload: Your Envoy proxy is configured to watch this directory. As\nsoon as the new configuration files appear, Envoy automatically detects the\nchange and loads the new settings without a restart.\n\n# Example\n\nBelow is an envoy environment deployed using docker compose:\n\n```\nservices:\n  envoy:\n    image: envoyproxy/envoy:v1.35-latest\n    ports:\n      - 80:80\n      - 443:443/tcp\n      - 443:443/udp\n    restart: unless-stopped\n    volumes:\n      - /etc/localtime:/etc/localtime:ro\n      - /etc/timezone:/etc/timezone:ro\n      - ./etc/envoy:/etc/envoy:ro\n```\n\nYou can create an envoy.ts file and write the following code to create an xDS\nfiles\n\n```\nimport { Cluster, Envoy, run } from 'https://raw.githubusercontent.com/powerpuffpenguin/envoy-xDS/1.35/mod.ts'\nconst scriptUrl = import.meta.url\nconst dir = scriptUrl.substring(7, scriptUrl.lastIndexOf('/'))\n\n\n// Defining xDS project\nconst envoy = new Envoy({\n    dir: `${dir}/etc/envoy`, // The directory where envoy xDS files are stored on the host machine\n    watch: '/etc/envoy', // Mount the xDS directory in the Docker container\n}).createClusters(\n    // Defining upstream\n    {\n        name: 'bing',\n        addr: 'bing.com:443',\n        protocol: 'https',\n        type: 'STRICT_DNS',\n        overlay: {\n            lb_policy: 'ROUND_ROBIN',\n            dns_lookup_family: 'V4_ONLY',\n        },\n    },\n    {\n        name: 'google',\n        addr: 'google.com:443',\n        protocol: 'auto',\n        type: 'STRICT_DNS',\n        overlay: {\n            lb_policy: 'ROUND_ROBIN',\n            dns_lookup_family: 'V4_ONLY',\n        },\n    },\n    // ...\n)\n// create router\nconst router = new Router({\n    name: 'demo',\n    hosts: [\n        {\n            name: 'search',\n            routes: [\n                {\n                    path: '/',\n                    response: 'bing',\n                    headers: [\n                        {\n                            name: ':authority',\n                            value: 'bing.com',\n                        }\n                    ],\n                    rewriteHost: 'www.bing.com',\n                },\n                {\n                    path: '/',\n                    response: 'google',\n                    websocket: 'both', // enable websocekt\n                    headers: [\n                        {\n                            name: ':authority',\n                            value: 'google.com',\n                        }\n                    ],\n                    rewriteHost: 'www.google.com',\n                },\n            ],\n        },\n    ],\n})\n\n// tls and listener\nenvoy.createCertificates(\n    // Defining tls certificates\n    {\n        name: 'abc',\n        cert: 'fullchain.pem',\n        key: 'privkey.pem',\n    },\n    // ...\n).createListeners(\n    // Defining Listeners\n    {\n        name: 'http',\n        addr: ':80',\n        // clone router\n        http: router.clone(\n            'http_' + router.name // new router name\n        ),\n    },\n    {\n        name: 'h2',\n        addr: ':443',\n        https: [\n            new FilterChain({\n                name: 'demo',\n                tls: 'abc',\n                dir: '/etc/envoy',\n                router: router.clone('h2_' + router.name),\n            })\n        ],\n    },\n    {\n        name: 'h3',\n        addr: ':443',\n        network: 'udp',\n        https: [\n            new FilterChain({\n                name: 'demo',\n                tls: 'abc',\n                dir: '/etc/envoy',\n                h3: true,\n                router: router.clone('h3_' + router.name),\n            })\n        ],\n    },\n)\n\n// run cli\nrun(Deno.args, envoy)\n```\n\nThen you can execute the -b/--build command to update xDS:\n\n```\ndeno run -A envoy.ts -b\n```\n\nOr execute the -t/--test command to print the generated xDS:\n\n```\ndeno run -A envoy.ts -t\n```\n\n\u003e When importing envoy-xDS/1.35/mod.ts , please switch the version number to the\n\u003e one compatible with the envoy you are using.\n\n# Init\n\nYou can enter the following command to initialize the deno environment required\nby xDS in the current folder:\n\n```\ndeno run -A https://raw.githubusercontent.com/powerpuffpenguin/envoy-xDS/main/init.ts -v 1.35\n```\n\n\u003e Please modify 1.35 to a branch compatible with the envoy version you are using\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowerpuffpenguin%2Fenvoy-xds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowerpuffpenguin%2Fenvoy-xds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowerpuffpenguin%2Fenvoy-xds/lists"}