diff --git a/README.md b/README.md index f2ba538..68681d4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ sing-box / universal proxy toolchain for Android. +一款使用 sing-box 的 Android 通用代理软件。 + ## 下载 / Downloads ### GitHub Releases @@ -39,9 +41,9 @@ https://matsuridayo.github.io * Hysteria ( hysteria-plugin ) * TUIC ( tuic-plugin & tuic-v5-plugin ) -请到[项目主页](https://matsuridayo.github.io)下载插件。 +请到[这里](https://matsuridayo.github.io/m-plugin/)下载插件。 -Please go to the [project homepage](https://matsuridayo.github.io) to download plugins. +Please visit [here](https://matsuridayo.github.io/m-plugin/) to download plugins. ## 订阅 / Subscription @@ -52,7 +54,8 @@ Please go to the [project homepage](https://matsuridayo.github.io) to download p 欢迎捐赠以支持项目开发。 -您也可以通过 [Google Play](https://play.google.com/store/apps/details?id=moe.nb4a) 购买捐赠 +* 您也可以通过 [Google Play](https://play.google.com/store/apps/details?id=moe.nb4a) 购买捐赠,另有支付宝微信购买方式,见 TG 频道置顶。 +* Donating via [Google Play](https://play.google.com/store/apps/details?id=moe.nb4a), using credit cards. USDT TRC20 diff --git a/app/src/main/java/io/nekohasekai/sagernet/fmt/ConfigBuilder.kt b/app/src/main/java/io/nekohasekai/sagernet/fmt/ConfigBuilder.kt index fbbf4ea..91fcc3d 100644 --- a/app/src/main/java/io/nekohasekai/sagernet/fmt/ConfigBuilder.kt +++ b/app/src/main/java/io/nekohasekai/sagernet/fmt/ConfigBuilder.kt @@ -578,30 +578,31 @@ fun buildConfig( protocol = rule.protocol.split("\n") } - // also bypass lookup - // cannot use other outbound profile to lookup... - val dnsRuleObj = DNSRule_DefaultOptions().apply { - if (uidList.isNotEmpty()) user_id = uidList - domainList?.let { makeSingBoxRule(it) } + fun makeDnsRuleObj(): DNSRule_DefaultOptions { + return DNSRule_DefaultOptions().apply { + if (uidList.isNotEmpty()) user_id = uidList + domainList?.let { makeSingBoxRule(it) } + } } + when (rule.outbound) { -1L -> { - userDNSRuleList += dnsRuleObj.apply { server = "dns-direct" } + userDNSRuleList += makeDnsRuleObj().apply { server = "dns-direct" } } 0L -> { - if (useFakeDns) userDNSRuleList += dnsRuleObj.apply { + if (useFakeDns) userDNSRuleList += makeDnsRuleObj().apply { server = "dns-fake" inbound = listOf("tun-in") } - userDNSRuleList += dnsRuleObj.apply { + userDNSRuleList += makeDnsRuleObj().apply { server = "dns-remote" inbound = null } } -2L -> { - userDNSRuleList += dnsRuleObj.apply { server = "dns-block" } + userDNSRuleList += makeDnsRuleObj().apply { server = "dns-block" } } }