From 1a1969edc9b8c6803debbd283401fc7afb234953 Mon Sep 17 00:00:00 2001 From: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Date: Tue, 19 May 2026 15:15:09 -0700 Subject: [PATCH] Proxy UDP fallback for hostname ACL routes --- core/src/main/java/com/github/shadowsocks/bg/BaseService.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt b/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt index f27f259d8..09b823b1e 100644 --- a/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt +++ b/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt @@ -335,7 +335,11 @@ object BaseService { val (profile, fallback) = expanded try { data.proxy = ProxyInstance(profile) - data.udpFallback = if (fallback == null) null else ProxyInstance(fallback, profile.route) + data.udpFallback = if (fallback == null) null else ProxyInstance(fallback, when (profile.route) { + // UDP relay sees IP endpoints, so hostname-only ACL routes would bypass the selected fallback. + Acl.GFWLIST, Acl.CUSTOM_RULES -> Acl.ALL + else -> profile.route + }) } catch (e: IllegalArgumentException) { data.notification = createNotification("") stopRunner(false, e.message)