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 1/2] 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) From 3fca3df79f733999edf72fd2acc1faf83fded8ee Mon Sep 17 00:00:00 2001 From: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Date: Fri, 12 Jun 2026 01:46:19 -0700 Subject: [PATCH 2/2] Clarify UDP fallback ACL route comment --- core/src/main/java/com/github/shadowsocks/bg/BaseService.kt | 3 ++- 1 file changed, 2 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 09b823b1e..0495a9b8f 100644 --- a/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt +++ b/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt @@ -336,7 +336,8 @@ object BaseService { try { data.proxy = ProxyInstance(profile) 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. + // UDP relay sees IP endpoints, so GFWLIST and mixed custom ACL routes need + // the selected fallback. Acl.GFWLIST, Acl.CUSTOM_RULES -> Acl.ALL else -> profile.route })