Fix VPN routing/DNS, ping latency display, and add user portal#15
Draft
Fix VPN routing/DNS, ping latency display, and add user portal#15
Conversation
Co-authored-by: AmiRCandy <141684579+AmiRCandy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix bugs in panel, server, and client
Fix VPN routing/DNS, ping latency display, and add user portal
Feb 25, 2026
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.
Users reported that VPN connections showed as established but no sites loaded, config selection showed misleading 0ms pings as "fastest", and there was no self-service portal for clients to access their configs.
Server — V2Ray client config (
server/protocols/v2ray.py)dnsblock (8.8.8.8,1.1.1.1,8.8.4.4) to generated client Xray config — previously absent, causing DNS failures through the tunnelgeosite:cn/geoip:cnrouting rules with explicit RFC-1918 CIDR bypass; geo-data files are not bundled with the Windows client, making these rules silently inertdomainStrategyfromAsIs→IPIfNonMatchServer — Missing logger (
server/routes/panel_api.py)import loggingandlogger = logging.getLogger(...)— was causingNameErrorcrashes on core start/stop/restart error paths.Client — Ping accuracy (
client/services/api.ts,client/components/ProfilesPage.tsx)PingAllProfilespreviously called/ping-allwhich returnedlatency: 0for every running protocol (server only checks process state, not connectivity). Replaced with parallel real ICMP pings via the nativemeasure_latencyTauri command.latency === 0as unmeasured rather than "fastest". Onlylatency > 0results participate in ranking.Web Panel — User portal (
web-panel/pages/UserPortalPage.tsx,web-panel/App.tsx,web-panel/components/Sidebar.tsx)New self-service portal at
/candyconnect/user— no admin credentials required. Uses existing/client-apiendpoints.Features:
.conf, download OpenVPN.ovpn, display L2TP/IKEv2 server+credentialsPortal is activated by path detection (
window.location.pathname.includes('/user')); the existing SPA catch-all inserver/main.pyalready servesindex.htmlfor all/candyconnect/*paths.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.