Skip to content

fix: clear mixed-port conflict UX (EADDRINUSE)#21

Merged
UndergroundAlzar merged 1 commit into
mainfrom
feature/port-conflict-ux
Jul 14, 2026
Merged

fix: clear mixed-port conflict UX (EADDRINUSE)#21
UndergroundAlzar merged 1 commit into
mainfrom
feature/port-conflict-ux

Conversation

@UndergroundAlzar

Copy link
Copy Markdown
Owner

Summary

When sing-box fails to bind mixed-port with Windows Only one usage of each socket address / POSIX address already in use / EADDRINUSE, the core startup path now logs and rejects with a clear bilingual (zh-CN + en) user-facing message.

The message tells the user the port is occupied (often another proxy such as Bettbox on 7890) and to change mixed-port in Settings to 17890+.

Changes

  • Add pure helper src/main/core/listenError.ts (isPortInUseListenError / mapCoreListenError / formatPortConflictUserMessage)
  • Wire it into manager.ts startup listeners (stderr/stdout listen errors, process error, and fatal-line mapping on early exit)
  • Unit tests for the pure mapper

Safety

No AikoBox launch, no sing-box run, no Bettbox/process kill, no system proxy changes.

@UndergroundAlzar
UndergroundAlzar force-pushed the feature/port-conflict-ux branch from 653a0b5 to b561c7c Compare July 14, 2026 01:06
Map Windows/POSIX EADDRINUSE-style listen errors to a bilingual
Chinese+English message in the core startup path (log + reject),
guiding users to free the port or switch mixed-port to 17890+.
@UndergroundAlzar
UndergroundAlzar force-pushed the feature/port-conflict-ux branch from b561c7c to 286a469 Compare July 14, 2026 01:14
@UndergroundAlzar
UndergroundAlzar merged commit 4b763bd into main Jul 14, 2026
2 checks passed
@UndergroundAlzar
UndergroundAlzar deleted the feature/port-conflict-ux branch July 14, 2026 01:17
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