Skip to content

feat: auto-detect clash proxy when updating remote profiles - #28

Merged
Itsusinn merged 1 commit into
mainfrom
feat/clash-proxy-for-update
Jul 31, 2026
Merged

feat: auto-detect clash proxy when updating remote profiles#28
Itsusinn merged 1 commit into
mainfrom
feat/clash-proxy-for-update

Conversation

@Itsusinn

Copy link
Copy Markdown
Member

Summary

Align updateRemoteProfile() with addRemoteProfile() — when no explicit proxy URL is configured, fall back to the running clash instance's mixed port so updates can go through the VPN tunnel. Also adds an update dialog so the user can inspect and override proxy settings before downloading.

Changes

ProfileViewModel.kt

  • updateRemoteProfile() now has a third fallback: proxyUrl → profile.proxyUrl → Global.clashInstance?.mixedPort()

ProfileScreen.kt

  • Clicking "update" on a remote profile now opens a dialog with:
    • Profile name display
    • User-Agent field (pre-filled from profile)
    • HTTP proxy field (pre-filled from profile; empty = auto-detect clash proxy)
    • Download progress indicator
    • Confirm / Cancel buttons

Motivation

Adding a remote profile already auto-detects the clash mixed port. But updating did not — if the profile was created without a proxy setting, updates would bypass the VPN entirely. This fixes that inconsistency.

Align updateRemoteProfile() with addRemoteProfile() — fall back to
clash mixed port when no explicit proxy is configured. Also add an
update dialog with editable UA/proxy fields so the user can see and
override the proxy before updating.

Signed-off-by: iHsin <sun@ihsin.dev>
Assisted-by: OpenClaw:deepseek-v4-flash
@Itsusinn
Itsusinn merged commit 09fa843 into main Jul 31, 2026
1 check passed
@Itsusinn
Itsusinn deleted the feat/clash-proxy-for-update branch July 31, 2026 01:53
Itsusinn added a commit that referenced this pull request Jul 31, 2026
Align updateRemoteProfile() with addRemoteProfile() — fall back to
clash mixed port when no explicit proxy is configured. Also add an
update dialog with editable UA/proxy fields so the user can see and
override the proxy before updating.

Assisted-by: OpenClaw:deepseek-v4-flash

Signed-off-by: iHsin <sun@ihsin.dev>
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.

1 participant