{"id":13522560,"url":"https://github.com/wolf-joe/ts-dns","last_synced_at":"2026-01-14T12:01:14.388Z","repository":{"id":40201306,"uuid":"245324690","full_name":"wolf-joe/ts-dns","owner":"wolf-joe","description":"Telescope DNS，灵活快速的DNS分组转发器","archived":true,"fork":false,"pushed_at":"2023-05-12T07:41:13.000Z","size":975,"stargazers_count":315,"open_issues_count":5,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-13T18:51:08.762Z","etag":null,"topics":["dns","dns-over-https","dns-over-tls","forwarder","gfwlist"],"latest_commit_sha":null,"homepage":"","language":"Go","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/wolf-joe.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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}},"created_at":"2020-03-06T03:50:00.000Z","updated_at":"2025-12-28T06:28:43.000Z","dependencies_parsed_at":"2024-01-13T16:22:06.982Z","dependency_job_id":"96efb9fc-c7c8-4e74-a79e-0942f041ce39","html_url":"https://github.com/wolf-joe/ts-dns","commit_stats":null,"previous_names":["wolf-joe/dns-splitter"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/wolf-joe/ts-dns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf-joe%2Fts-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf-joe%2Fts-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf-joe%2Fts-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf-joe%2Fts-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolf-joe","download_url":"https://codeload.github.com/wolf-joe/ts-dns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolf-joe%2Fts-dns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"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":["dns","dns-over-https","dns-over-tls","forwarder","gfwlist"],"created_at":"2024-08-01T06:00:49.059Z","updated_at":"2026-01-14T12:01:14.364Z","avatar_url":"https://github.com/wolf-joe.png","language":"Go","funding_links":[],"categories":["DNS","Go"],"sub_categories":[],"readme":"# Telescope DNS\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/wolf-joe/ts-dns)](https://github.com/wolf-joe/ts-dns/releases)\n[![Go](https://github.com/wolf-joe/ts-dns/actions/workflows/go.yml/badge.svg)](https://github.com/wolf-joe/ts-dns/actions/workflows/go.yml)\n[![codecov](https://codecov.io/gh/wolf-joe/ts-dns/branch/master/graph/badge.svg)](https://codecov.io/gh/wolf-joe/ts-dns)\n[![Go Report Card](https://goreportcard.com/badge/github.com/wolf-joe/ts-dns)](https://goreportcard.com/report/github.com/wolf-joe/ts-dns)\n![GitHub](https://img.shields.io/github/license/wolf-joe/ts-dns)\n\n\u003e 灵活快速的DNS分组转发器\n\n## 设计目标\n### 灵活解析\n* 支持按ABP风格规则/`GFWList`对DNS请求进行分组\n* 支持按CIDR对DNS请求进行重定向\n* 支持DNS over UDP/TCP/TLS/HTTPS、socks5代理、ECS\n* 支持将查询结果中的IPv4地址添加至IPSet\n### 快速解析\n* 支持并发请求上游DNS，选择最快响应\n* 选择ping值最低的IPv4地址（tcp/icmp ping）\n* 支持hosts/DNS缓存/屏蔽指定查询类型\n* 支持热重载配置文件\n\n## 解析流程\n![arch.drawio.svg](doc/arch.drawio.svg)\n\n```\n查找hosts -\u003e 查找缓存 -\u003e 匹配规则 -\u003e 指定group处理 -\u003e 重定向 -\u003e 设置缓存\n```\n\n## 使用说明\n\n1. 在[Releases页面](https://github.com/wolf-joe/ts-dns/releases)下载对应系统和平台的压缩包；\n2. 解压后按需求编辑配置文件`ts-dns.toml`（可选）并运行进程：\n  ```shell\n  # ./ts-dns -h  # 显示命令行帮助信息\n  # ./ts-dns -c ts-dns.toml  # 指定配置文件名\n  ./ts-dns\n  kill -SIGHUP \u003cPID\u003e # 重载配置文件\n  ```\n\n## 配置示例\n\n\u003e 完整配置文件参见`ts-dns.full.toml`\n\n1. 默认配置（`ts-dns.toml`），开箱即用\n  ```toml\n  listen = \":53\"\n\n  [groups]\n    [groups.clean]\n    dns = [\"223.5.5.5\", \"114.114.114.114\"]\n    concurrent = true\n\n    [groups.dirty]\n    dns = [\"\"] # 省略\n    gfwlist_file = \"gfwlist.txt\"\n  ```\n\n2. 选择ping值最低的IPv4地址（启用时建议以root权限运行本程序）\n  ```toml\n  # ...\n  [groups.clean]\n    dns = [\"223.5.5.5\", \"114.114.114.114\"]\n    fastest_v4 = true\n  # ...\n  ```\n\n3. 指定hosts文件和自定义hosts\n  ```toml\n  # ...\n  hosts_files = [\"adaway.txt\"]\n  [hosts]\n  \"www.example.com\" = \"1.1.1.1\"\n  # ...\n  ```\n\n4. 使用socks5代理转发DNS请求\n  ```toml\n  # ...\n    [groups.dirty]\n    socks5 = \"127.0.0.1:1080\"\n    # ...\n  ```\n\n5. 转发至上游DNS时默认附带指定ECS信息（暂不支持DOH）\n  ```toml\n  # ...\n    [groups.clean]\n    ecs = \"1.2.4.0/24\"\n    # ...\n  ```\n\n6. 自定义域名分组\n  ```toml\n  # ...\n    [groups.work]\n    dns = [\"10.1.1.1\"]\n    rules = [\"company.com\"]\n    # ...\n  ```\n\n7. 动态添加IPSet记录（使用前请阅读`ts-dns.full.toml`对应说明）\n  ```toml\n  # ...\n    [groups.dirty]\n    ipset = \"blocked\"\n    ipset_ttl = 86400\n    # ...\n  ```\n\n\n## 未来规划\n\n- [ ] 支持定期拉取最新gfwlist\n- [ ] 支持http接口管理\n- [ ] 降低gfwlist的匹配优先级\n- [ ] DoT/GFWList域名解析自闭环\n\n## 特别鸣谢\n* [github.com/arloan/prdns](https://github.com/arloan/prdns)\n* [github.com/gfwlist/gfwlist](https://github.com/gfwlist/gfwlist)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolf-joe%2Fts-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolf-joe%2Fts-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolf-joe%2Fts-dns/lists"}