Skip to content

Custom DNS #1

@ComfortikVPN

Description

@ComfortikVPN

Привет!

Пытался настроить фильтрацию по DNS адресам через ACL, caddy и forward_proxy это позволяют через конфиг. И через AdGuardHome.
Но столкнулся с тем, что я не вижу на сервере DNS-запросы. Изучил код, понял, что в приложении DoH на сервера CloudFlare .

Может быть реализовать подтягивание DNS-сервера вместе с конфигом?

app/Shared/NaiveConfigBuilder.swift

 let config: [String: Any] = [
            "log": [
                "level": "info",
            ],
            "dns": [
                "servers": [
                    [
                        "type": "local",
                        "tag": "local-dns",
                    ],
                    [
                        "type": "https",
                        "tag": "remote-dns",
                        "server": "1.1.1.1",
                        "server_port": 443,
                        "path": "/dns-query",
                        "tls": [
                            "enabled": true,
                            "server_name": "cloudflare-dns.com",
                        ],
                        "detour": "naive-out",
                    ],
                ],
                "final": "remote-dns",
                "strategy": "ipv4_only",
            ],
            "inbounds": [
                [
                    "type": "tun",
                    "tag": "tun-in",
                    "address": [
                        "172.19.0.1/30",
                    ],
                    "auto_route": true,
                    "strict_route": true,
                ],
            ],
            "outbounds": [
                naiveOutbound,
                [
                    "type": "direct",
                    "tag": "direct",
                ],
            ],
            "route": [
                "auto_detect_interface": true,
                "default_domain_resolver": "local-dns",
                "final": "naive-out",
                "rules": [
                    [
                        "action": "sniff",
                    ],
                    [
                        "protocol": "dns",
                        "action": "hijack-dns",
                    ],
                ],
            ],
        ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions