Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/.idea/
/Libbox.xcframework/
xcuserdata/
.DS_Store/
.DS_Store
/build/
/sing-box.xcodeproj/project.pbxproj.back
CLAUDE.md
Expand Down
6 changes: 3 additions & 3 deletions ApplicationLibrary/Views/Setting/ProfileOverrideView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ public struct ProfileOverrideView: View {
}
} else {
FormView {
FormToggle("Hide VPN Icon", "Append `0.0.0.0/31` to `inet4_route_exclude_address` if not exists.", $excludeDefaultRoute) { newValue in
FormToggle("Hide VPN Icon", "Append `0.0.0.0/31` and `::/127` to `route_exclude_address` if not exists.", $excludeDefaultRoute) { newValue in
await SharedPreferences.excludeDefaultRoute.set(newValue)
}

FormToggle("No Default Route", """
By default, segment routing is used in `auto_route` instead of global routing.
If `*_<route_address/route_exclude_address>` exists in the configuration, this item will not take effect on the corresponding network (commonly used to resolve HomeKit compatibility issues).
If `<route_address/route_exclude_address>` exists in the configuration, this item will not take effect on the corresponding network (commonly used to resolve HomeKit compatibility issues).
""", $autoRouteUseSubRangesByDefault) { newValue in
await SharedPreferences.autoRouteUseSubRangesByDefault.set(newValue)
}

FormToggle("Exclude APNs Route", "Append `push.apple.com` to `bypass_domain`, and `17.0.0.0/8` to `inet4_route_exclude_address`.", $excludeAPNsRoute) { newValue in
FormToggle("Exclude APNs Route", "Append `push.apple.com` to `bypass_domain`, and `17.0.0.0/8` to `route_exclude_address`.", $excludeAPNsRoute) { newValue in
await SharedPreferences.excludeAPNsRoute.set(newValue)
}

Expand Down
8 changes: 8 additions & 0 deletions Library/Network/ExtensionPlatformInterface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc
ipv6ExcludeRoutes.append(NEIPv6Route(destinationAddress: ipv6RoutePrefix.address(), networkPrefixLength: NSNumber(value: ipv6RoutePrefix.prefix())))
}

if await SharedPreferences.excludeDefaultRoute.get(), !ipv6Routes.isEmpty {
if !ipv6ExcludeRoutes.contains(where: { it in
it.destinationAddress == "::" && it.destinationNetworkPrefixLength == 127
}) {
ipv6ExcludeRoutes.append(NEIPv6Route(destinationAddress: "::", networkPrefixLength: 127))
}
}

ipv6Settings.includedRoutes = ipv6Routes
ipv6Settings.excludedRoutes = ipv6ExcludeRoutes
settings.ipv6Settings = ipv6Settings
Expand Down
12 changes: 6 additions & 6 deletions Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,22 @@
}
}
},
"Append `0.0.0.0/31` to `inet4_route_exclude_address` if not exists." : {
"Append `0.0.0.0/31` and `::/127` to `route_exclude_address` if not exists." : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "将会附加 `0.0.0.0/31` 到 `inet4_route_exclude_address`。"
"value" : "将会附加 `0.0.0.0/31` 和 `::/127` 到 `route_exclude_address`。"
}
}
}
},
"Append `push.apple.com` to `bypass_domain`, and `17.0.0.0/8` to `inet4_route_exclude_address`." : {
"Append `push.apple.com` to `bypass_domain`, and `17.0.0.0/8` to `route_exclude_address`." : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "将会附加 `push.apple.com` 到 `bypass_domain`, 附加 `17.0.0.0/8` 到 `inet4_route_exclude_address`。"
"value" : "将会附加 `push.apple.com` 到 `bypass_domain`, 附加 `17.0.0.0/8` 到 `route_exclude_address`。"
}
}
}
Expand Down Expand Up @@ -176,12 +176,12 @@
}
}
},
"By default, segment routing is used in `auto_route` instead of global routing.\nIf `*_<route_address/route_exclude_address>` exists in the configuration, this item will not take effect on the corresponding network (commonly used to resolve HomeKit compatibility issues)." : {
"By default, segment routing is used in `auto_route` instead of global routing.\nIf `<route_address/route_exclude_address>` exists in the configuration, this item will not take effect on the corresponding network (commonly used to resolve HomeKit compatibility issues)." : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "在默认情况下,`auto_route` 中使用分段路由,而非全局路由。\n若配置中存在 `*_<route_address/route_exclude_address>`,则此项不会在对应网络上生效(常用于解决 HomeKit 兼容性问题)。"
"value" : "在默认情况下,`auto_route` 中使用分段路由,而非全局路由。\n若配置中存在 `<route_address/route_exclude_address>`,则此项不会在对应网络上生效(常用于解决 HomeKit 兼容性问题)。"
}
}
}
Expand Down