Skip to content

Support health-check for single node#246

Merged
Goooler merged 9 commits into
trunkfrom
copilot/port-pull-request-683
May 31, 2026
Merged

Support health-check for single node#246
Goooler merged 9 commits into
trunkfrom
copilot/port-pull-request-683

Conversation

Copy link
Copy Markdown

Copilot AI commented May 14, 2026

Summary

  • Ported the per-proxy health-check capability from ClashMetaForAndroid PR feat: add HealthCheck for specified proxy MetaCubeX/ClashMetaForAndroid#683 into Tabby.
  • Added a new per-proxy health-check path through IClashManagerClashManagerClashBridge (JNI/C) → native Go tunnel.
  • Updated Go tunnel connectivity logic to support targeted proxy health checks and non-group fallback URL testing.
  • Updated Proxy UI/ViewModel so tapping each proxy delay badge triggers a per-proxy health check and shows pending feedback inline.

Validation

  • ./gradlew spotlessApply app:assembleDebug could not run in this environment because Gradle could not resolve com.android.application:9.2.1 from configured repositories.
  • parallel_validation was run multiple times:
    • Code review completed successfully; remaining feedback is non-blocking style suggestions.
    • CodeQL reported no alerts when it completed; final run hit timeout budget per tool warning.

Notes

  • No PR template was found in this repository, so standard summary/validation sections are provided.

Copilot AI and others added 5 commits May 14, 2026 13:21
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>
@Goooler Goooler changed the title Port ClashMetaForAndroid PR #683 (per-proxy health check) Support health-check for single node May 31, 2026
@Goooler Goooler marked this pull request as ready for review May 31, 2026 11:06
@Goooler Goooler requested a review from Copilot May 31, 2026 11:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 → IClashManagerClashManagerClashBridge JNI → Go tunnel.HealthCheckProxy, with a shared probeURL helper that picks a URL from ExtraDelayHistories or defaults to gstatic.com/generate_204.
  • Existing tunnel.HealthCheck now falls back to probeURL for non-group proxies instead of just warning.
  • ProxyViewModel/ProxyScreen track per-proxy delay-testing state via delayTestingKeys + 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.

Comment thread core/src/main/golang/native/tunnel.go
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Goooler Goooler requested a review from Copilot May 31, 2026 11:17
@Goooler Goooler merged commit 6ee702d into trunk May 31, 2026
4 of 5 checks passed
@Goooler Goooler deleted the copilot/port-pull-request-683 branch May 31, 2026 11:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants