diff --git a/mihomo/files/mihomo.conf b/mihomo/files/mihomo.conf index 6319e411b..235f99297 100644 --- a/mihomo/files/mihomo.conf +++ b/mihomo/files/mihomo.conf @@ -11,8 +11,8 @@ config config 'config' config proxy 'proxy' option 'transparent_proxy' '1' - option 'tcp_transparent_proxy_mode' 'tproxy' - option 'udp_transparent_proxy_mode' 'tproxy' + option 'tcp_transparent_proxy_mode' 'redirect' + option 'udp_transparent_proxy_mode' 'tun' option 'ipv4_dns_hijack' '1' option 'ipv6_dns_hijack' '1' option 'ipv4_proxy' '1' @@ -33,7 +33,7 @@ config subscription 'subscription' option 'user_agent' 'clash' config mixin 'mixin' - option 'log_level' 'info' + option 'log_level' 'warning' option 'mode' 'rule' option 'match_process' 'off' option 'outbound_interface' '' @@ -68,7 +68,7 @@ config mixin 'mixin' option 'dns_doh_prefer_http3' '0' option 'dns_ipv6' '0' option 'dns_system_hosts' '0' - option 'dns_hosts' '0' + option 'dns_hosts' '1' option 'hosts' '0' option 'dns_nameserver' '0' option 'dns_nameserver_policy' '0' @@ -104,6 +104,12 @@ config nameserver list 'nameserver' 'https://dns.alidns.com/dns-query' list 'nameserver' 'https://doh.pub/dns-query' +config nameserver + option 'enabled' '1' + option 'type' 'direct-nameserver' + list 'nameserver' 'https://dns.alidns.com/dns-query' + list 'nameserver' 'https://doh.pub/dns-query' + config nameserver option 'enabled' '1' option 'type' 'nameserver' diff --git a/mihomo/files/mihomo.init b/mihomo/files/mihomo.init index 2aa23de73..475070df4 100644 --- a/mihomo/files/mihomo.init +++ b/mihomo/files/mihomo.init @@ -148,13 +148,13 @@ start_service() { ui_path="ui" ui_name="$ui_name" ui_url="$ui_url" api_listen="0.0.0.0:$api_port" api_secret="$api_secret" \ allow_lan="$allow_lan" http_port="$http_port" socks_port="$socks_port" mixed_port="$mixed_port" redir_port="$redir_port" tproxy_port="$tproxy_port" \ tun_enable="$tun_enable" tun_stack="$tun_stack" tun_device="$TUN_DEVICE" tun_mtu="$tun_mtu" tun_gso="$tun_gso" tun_gso_max_size="$tun_gso_max_size" tun_endpoint_independent_nat="$tun_endpoint_independent_nat" \ - dns_enable="true" dns_listen="0.0.0.0:$dns_port" \ + dns_enable="true" dns_listen="0.0.0.0:$dns_port" dns_mode="$dns_mode" fake_ip_range="$fake_ip_range" \ yq -M -i ' .log-level = env(log_level) | .ipv6 = env(ipv6) == 1 | .external-ui = env(ui_path) | .external-ui-name = env(ui_name) | .external-ui-url = env(ui_url) | .external-controller = env(api_listen) | .secret = env(api_secret) | .allow-lan = env(allow_lan) == 1 | .port = env(http_port) | .socks-port = env(socks_port) | .mixed-port = env(mixed_port) | .redir-port = env(redir_port) | .tproxy-port = env(tproxy_port) | .tun.enable = env(tun_enable) == 1 | .tun.stack = env(tun_stack) | .tun.device = env(tun_device) | .tun.mtu = env(tun_mtu) | .tun.gso = env(tun_gso) == 1 | .tun.gso-max-size = env(tun_gso_max_size) | .tun.endpoint-independent-nat = env(tun_endpoint_independent_nat) == 1 | - .dns.enable = env(dns_enable) | .dns.listen = env(dns_listen) + .dns.enable = env(dns_enable) | .dns.listen = env(dns_listen) | .dns.enhanced-mode = env(dns_mode) | .dns.fake-ip-range = env(fake_ip_range) ' "$RUN_PROFILE_PATH" else log "Mixin is enabled, mixin all config."