An open API service indexing awesome lists of open source software.

https://github.com/shengyanli1982/load-ants

🐜🐜🐜 An lightweight DNS forwarder converting UDP/TCP queries to DoH and DoH queries forwarding, written in Rust.
https://github.com/shengyanli1982/load-ants

cache clash dns dns-forwarder dns-over-https dns-server docker doh high-performance optimization proxy proxy-server rust v2ray

Last synced: 3 months ago
JSON representation

🐜🐜🐜 An lightweight DNS forwarder converting UDP/TCP queries to DoH and DoH queries forwarding, written in Rust.

Awesome Lists containing this project

README

          

中文 | [English](./README_EN.md)


LOAD ANTS


🐜🐜🐜 轻量级 DNS 分流转发器:支持 UDP/TCP/DoH 入站,上游支持 DoH 与传统 DNS(UDP/TCP)



logo



license
Ask DeepWiki

**Load Ants** 是一款专为提升网络隐私、安全与灵活性而生的高性能、多功能 DNS 代理服务。

### 核心功能

- 🔄 **多协议入站**: 支持 UDP/53、TCP/53 与 DoH 入站。
- 🌐 **多上游协议**: 上游支持 DoH 与传统 DNS(UDP/TCP)。
- 🧠 **智能路由**: 根据域名模式(精确、通配符、正则)路由 DNS 查询。
- ⚡ **高性能缓存**: 内置缓存机制,显著降低延迟。
- ⚖️ **灵活上游管理**: 上游分组 + 多种负载均衡策略(轮询/加权/随机)。

### 📚 阅读完整文档!

所有详细文档,包括配置、部署指南和高级用法,均已迁移至我们的专属文档网站。

**[➡️ 访问官方文档网站](https://shengyanli1982.github.io/load-ants/)**

### 配置校验(重要)

- 必须至少配置 `static_rules` 或 `remote_rules` 之一(至少一个规则来源)。
- 必须至少存在一个 `action: forward` 的规则,否则程序会在启动阶段报错退出。
- 只要存在任何 `forward` 规则:必须配置 `upstream_groups`,且所有 `target` 必须引用已存在的上游组名。
- 可用命令校验配置(校验通过后直接退出):

```bash
loadants --test -c ./config.yaml
```

### 🚀 快速开始

使用 Docker 在几秒钟内启动并运行:

```bash
# 为您的配置创建一个目录
mkdir -p ./load-ants-config
# 下载默认配置以开始使用
wget -O ./load-ants-config/config.yaml https://raw.githubusercontent.com/shengyanli1982/load-ants/main/config.default.yaml
# 根据您的需求编辑 config.yaml,然后运行:
docker run -d \
--name load-ants \
-p 53:53/udp \
-p 53:53/tcp \
-p 8080:8080 \
-v $(pwd)/load-ants-config:/etc/load-ants \
ghcr.io/shengyanli1982/load-ants-x64:latest -c /etc/load-ants/config.yaml
```

### 开源许可

本项目采用 [MIT 许可证](./LICENSE) 授权。