Support health-check for single node#246
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/Goooler/Tabby/sessions/90f72284-b0a3-44be-a04b-2493a536cb5b Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Goooler/Tabby/sessions/90f72284-b0a3-44be-a04b-2493a536cb5b Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Goooler/Tabby/sessions/90f72284-b0a3-44be-a04b-2493a536cb5b Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Goooler/Tabby/sessions/90f72284-b0a3-44be-a04b-2493a536cb5b Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Goooler
May 14, 2026 13:31
View session
There was a problem hiding this comment.
Pull request overview
Ports per-proxy health-check capability from ClashMetaForAndroid PR MetaCubeX#683 into Tabby, allowing users to tap an individual proxy's delay badge to trigger a targeted health check instead of testing the entire group.
Changes:
- New end-to-end
healthCheckProxy(group, name)path: Kotlin UI →IClashManager→ClashManager→Clash→BridgeJNI → Gotunnel.HealthCheckProxy, with a sharedprobeURLhelper that picks a URL fromExtraDelayHistoriesor defaults togstatic.com/generate_204. - Existing
tunnel.HealthChecknow falls back toprobeURLfor non-group proxies instead of just warning. ProxyViewModel/ProxyScreentrack per-proxy delay-testing state viadelayTestingKeys+refreshVersion, render the delay value as a clickable badge with a···placeholder while pending, and prune testing keys on reload; the empty-delay fallback also changes from""to"--".
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ui/proxy/src/main/kotlin/com/github/kr328/clash/proxy/vm/ProxyViewModel.kt | Adds onProxyDelayTest, per-proxy delayTestingKeys state, delayTesting flag on item UI state, and -- fallback for unknown delay. |
| ui/proxy/src/main/kotlin/com/github/kr328/clash/proxy/ui/ProxyScreen.kt | Wires onProxyDelayTest callback through pager/group/item composables and turns the delay text into a clickable circular badge with pending placeholder. |
| service/src/main/kotlin/com/github/kr328/clash/service/remote/IClashManager.kt | Adds suspend fun healthCheckProxy(group, name) to the binder interface. |
| service/src/main/kotlin/com/github/kr328/clash/service/ClashManager.kt | Implements healthCheckProxy by delegating to Clash.healthCheckProxy(...).await(). |
| core/src/main/kotlin/com/github/kr328/clash/core/Clash.kt | Adds healthCheckProxy wrapper around Bridge.nativeHealthCheckProxy. |
| core/src/main/kotlin/com/github/kr328/clash/core/bridge/Bridge.kt | Declares external fun nativeHealthCheckProxy(...). |
| core/src/main/cpp/main.c | JNI implementation that forwards (completable, groupName, proxyName) to Go healthCheckProxy; also a whitespace tweak on the existing nativeHealthCheck signature. |
| core/src/main/golang/native/tunnel.go | Exports healthCheckProxy that runs the check in a goroutine and completes the JNI completable. |
| core/src/main/golang/native/tunnel/connectivity.go | Adds shared probeURL helper and HealthCheckProxy(groupName, proxyName); non-group HealthCheck now also calls probeURL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Summary
IClashManager→ClashManager→Clash→Bridge(JNI/C) → native Go tunnel.Validation
./gradlew spotlessApply app:assembleDebugcould not run in this environment because Gradle could not resolvecom.android.application:9.2.1from configured repositories.parallel_validationwas run multiple times:Notes