Router groups go tun - #103
Open
Gitefy wants to merge 29 commits into
Open
Conversation
…r lifecycle defects - Decouple router group drag reordering from source subscription userOrder via RouterMember.userOrder - Fix GroupUpdater concurrency lock release on duplicate update or confirmation abort - Eliminate OkHttp Response and Socket leaks in WebDAV settings test - Fix ConfigurationFragment ViewPager2 listener leaks, state persistence, and N+1 query - Add access mutex locking and core state checks in libcore box.go SelectOutbound/SelectOutboundFor - Add confirmation dialog before router group deletion - Ensure dangling router members and invalid selections are cleaned after backup restore - Update traffic looper, background service notifications, and bump version to 1.4.6 (code 49)
… open - Load profiles immediately on GroupFragment.onViewCreated instead of relying on onResume - Replace fragile configurationListView.size == 0 check with adapter.itemCount check - Use runOnMainDispatcher for ConfigurationAdapter UI updates to prevent View.post queue drops - Auto-reconcile router members on startup, pager reload, proxy import, and profile creation - Add fallback reconciliation in reloadProfiles if router members are empty but proxies exist - Broadcast routerGroupsUpdated via GroupManager.Listener on reconciliation completion - Fix router group mode filtering in ConfigurationAdapter onAdd, onUpdated, and onRemoved - Add GroupManagerListenerTest unit test verifying routerGroupsUpdated callback
…nd drawer router group - Retain only arm64-v8a ABI across Gradle splits, hev-tunnel, and libcore verification, pruning armeabi-v7a, x86, and x86_64 - Remove the Network module (NetworkFragment, layout_network.xml) from ToolsFragment and hide the single tab strip - Remove WebDAV backup mode, WebDAV settings activity/layout/preferences, and related constants and DataStore accessors - Remove nav_router_group from drawer sidebar menu and MainActivity dispatch (RouterGroupListActivity remains accessible from GroupFragment and ConfigurationFragment)
…yType and filtering corrupted profiles - Fix NullPointerException in ProxyEntity.displayType when bean is null (use safe calls instead of !!) - Protect serializeToBuffer against null bean serialization errors - Include profile and group IDs in requireBean error message for faster diagnostics - Filter out and auto-cleanup corrupted profiles in BackupFragment.doBackup - Add try-catch around doBackup in export/share click listeners - Add ProxyEntityNullSafetyTest unit tests
…rsioning - Fix B01 & B04: introduce KryoConverters.withStrictDeserialization to rethrow KryoException on truncated beans - Fix B02: reload build metadata per invocation in Helpers.kt instead of reusing cached static state - Fix B03 & B06: pre-decode backup content in memory, validate rule routerGroupId references, and prevent destructive replacement on failure - Fix B05: protect backup restore and reboot in NonCancellable coroutine context using applicationContext - Fix B07: cleanup invalid router members and clear selections without deleting database proxies - Fix B08: enforce non-null subscription on SUBSCRIPTION proxy groups - Fix B09: distinguish explicit null from missing JSON sections to retain existing tables safely - Fix concurrency issues in RouterGroupRepository.select() transaction and ConfigurationFragment.commitMove() - Update nb4a.properties to 1.4.7 (versionCode 250) - Add comprehensive JVM tests for backup integrity, proxy group serialization, and router member ordering
…tion - R01: Enclose GroupManager.reconcileRouterMembers and RouterGroupRepository in synchronized(routerSyncLock) + Room transaction; dynamically load fresh router state and preserve concurrent manual selections. - R02: Enforce stable identity verification in partial backup restore using stableTag for routers and routerStableId for profiles. - R03: Validate KeyValuePair payload lengths and protect preference getters against BufferUnderflowException. - R04: Throw KryoException on null/empty payload deserialization when STRICT_DESERIALIZATION is enabled. - R05: Add DFS cycle and missing reference validation for ChainBean, frontProxy, and landingProxy; guard ConfigBuilder.resolveChainInternal recursion loops. - AnyTLS: Propagate DataStore.globalAllowInsecure to AnyTLS outbound TLS options.
R01: Allow default proxy groups (ungrouped=true) to have null/blank names during backup restore. R02: Guard against stale member writes in RouterGroup reconcile using matchConfig version checks, and replace full-row copy updates with field-level DAO methods. R03: Include ruleOutboundRefs with stable proxy identity during rules-only export to enable self-restore verification. R04: Support low-frequency URLTest intervals (>1800s) by setting idle_timeout = 2*interval, add idle_timeout field to Outbound_URLTestOptions, and add upper limit validation. R05: Exclude Router member nodes from being ignored when dynamicMain is active so independent Router traffic is counted. StringSet: Correct length calculation to use UTF-8 byte size instead of character count.
- pin local sing-box to cf69a007 (Add go TUN stack), sing v0.9.4-dev, sing-tun v0.9.1-dev - default TUN implementation to Go stack for better CPU/memory/power efficiency - mirror sing-box 1.15 TUN options (address, dns_mode, dns_address, interface_name) - include checkpoint scratch files
Removes development scratch dumps (including a real-config checkpoint with node credentials) accidentally committed in c841034, and ignores scratch/ to prevent future checkpoints from entering the repository.
Reverts to the router-groups baseline for changes that are unrelated to the sing-box 1.15 / Go TUN upgrade: - BootReceiver goAsync() - RoomPreferenceDataStore read-through cache (stale-cache / concurrency risk) - shared Gson instances in V2RayFmt and RouterFilter - RouterGroupListFragment rebuild - BackupFragment / DataStore cache invalidation hooks Keeps only TUN-related changes: TunImplementation.GO, GO default, stack mapping and the 1.15 address schema migration.
- Explicitly require sagernet/gvisor v0.0.0-20260727.0-sing-box-mod.1 because its pseudo-version sorts lower than the old one under MVS, causing a build failure with WritePacketDirect. - Remove the duplicate int_array_4 added by the Go TUN commit.
- Add buildDnsServerOptions() to emit typed DNS servers (local/fakeip/rcode/ https/tls/tcp/udp/quic/h3) because the legacy 'address' field was removed in sing-box 1.14. - Move FakeIP ranges from the removed dns.fakeip section onto the fakeip DNS server itself. - Add Endpoint / Endpoint_WireGuardOptions / Endpoint_WireGuardPeer classes and emit WireGuard nodes under 'endpoints' with the new peers[] schema. - Stop emitting Snell quic_proxy_mode, which upstream 1.15 rejects as an unknown field.
- UrlTest now uses common/urltest.URLTest through the target outbound/endpoint, replacing the http.DefaultClient direct-probe placeholder. - SetV2rayStats / QueryStats use experimental/v2rayapi.StatsService. - ResetAllConnections calls ConnectionManager.CloseAll() instead of logging.
- Move sendFdToProtect and OpenInterface behind unix build tags so libcore can be compiled and tested on Windows host. - Add libcore/config_parse_test.go covering TUN stack variants, protocol outbound smoke tests and WireGuard endpoint reachability.
- docs/sing-box-1.15-upgrade.md: dependency pins, schema migrations, known compat items and gVisor fallback policy. - GO_TUN_UPGRADE_VERIFICATION.md: discovered/fixed/open issues, build status, protocol compatibility and real-device checklist. - Ignore scratch/ and libcore/gomobile/ in .gitignore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
using singbox 1.15.0