{"id":17922049,"url":"https://github.com/mritd/dnsbot","last_synced_at":"2025-04-03T08:43:27.259Z","repository":{"id":64306686,"uuid":"321387387","full_name":"mritd/dnsbot","owner":"mritd","description":"Telegram Bot for etcdhosts","archived":false,"fork":false,"pushed_at":"2020-12-14T15:48:43.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T22:15:03.898Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mritd.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}},"created_at":"2020-12-14T15:16:52.000Z","updated_at":"2020-12-17T04:58:32.000Z","dependencies_parsed_at":"2023-01-15T10:45:44.943Z","dependency_job_id":null,"html_url":"https://github.com/mritd/dnsbot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mritd%2Fdnsbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mritd%2Fdnsbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mritd%2Fdnsbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mritd%2Fdnsbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mritd","download_url":"https://codeload.github.com/mritd/dnsbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970349,"owners_count":20862508,"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-10-28T20:37:21.625Z","updated_at":"2025-04-03T08:43:27.227Z","avatar_url":"https://github.com/mritd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## dnsbot\n\n\u003e 这是一个为 [etcdhosts](https://github.com/ytpay/etcdhosts) 插件编写的 Telegram 机器人。\n\n### 一、如何使用\n\n#### 1.1、二进制启动\n\n从 [Release](https://github.com/mritd/dnsbot/releases) 页下载预编译二进制文件，直接启动既可；**使用前提是你需要自己创建 Telegram 机器人，\n并且部署该机器人的网络能正常访问 Telegram API(或访问其代理地址)。**\n\n```sh\n➜ ./dnsbot_darwin_amd64 --config ../dnsbot.yaml \n2020-12-14 23:24:00     INFO    DNS Bot Starting...\n```\n\n#### 1.2、Docker 运行\n\n本项目已经发布了预编译的 Docker 镜像到 [Docker Hub]()，Docker 用户可以直接运行:\n\n```sh\ndocker run -dt --name dnsbot -v `pwd`/dnsbot.yaml:/etc/dnsbot.yaml mritd/dnsbot --config /etc/dnsbot.yaml\n```\n\n### 二、配置文件\n\ndnsbot 配置文件采用 yaml 格式，其配置如下:\n\n```yaml\n# 机器人 Toekn\nbot_token: \"1402163:AAF1ktxkF_WfEabJsJ0rWnFqyfY\"\n# 允许调用该机器人的用户 IP 列表\nbot_admins:\n  - \"3053639\"\n# 允许调用该机器人的组 ID 列表\nbot_admin_groups:\n  - \"-4565493\"\n# etcdhosts 插件实用的 etcd key\netcd_host_key: /etcdhosts\n# etcd 相关 证书\n# 注意: 证书可以采用 base64 编码直接粘贴在此\n#       也可以使用证书的绝对路径指定证书文件\n# base64 编码命令: cat /etc/etcd/ssl/etcd.pem | base64 | tr -d '\\n'\netcd_ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\netcd_cert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t...\netcd_key: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVkt...\n# etcd 集群地址\netcd_endpoints:\n  - https://172.16.1.21:2379\n  - https://172.16.1.22:2379\n  - https://172.16.1.23:2379\n```\n\n### 三、机器人使用样例\n\n![dnsbot_cmd.png](dnsbot_cmd.png)\n\n- `/add [domain] [ip]`: 域名或 IP 缺少时会进入交互式处理，默认 5m 超时\n- `/del [domain]`: 域名缺少时进入交互式处理，默认 5m 超时\n- `/print`: markdown 格式回复消息(包含所有域名记录)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmritd%2Fdnsbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmritd%2Fdnsbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmritd%2Fdnsbot/lists"}