services:
    mihomo:
        image: metacubex/mihomo:latest
        container_name: mihomo
        restart: unless-stopped
        network_mode: host
        volumes:
            - ./config:/root/.config/mihomo
            # - /dev/net/tun:/dev/net/tun # 👈 Добавить эту строку
        cap_add:
            - NET_ADMIN
            # - SYS_ADMIN # 👈 Добавить для TUN

    mtg:
        image: nineseconds/mtg:2
        container_name: mtg
        restart: unless-stopped
        network_mode: host
        volumes:
            - ./mtg-config.toml:/config.toml:ro
        cap_add:
            - NET_ADMIN
