- Add tabbed interface (Basic/Advanced/History) - Add quick action buttons for common formats - Add preset system (Clash/Surge/QuanX/Sing-box/Node list) - Add form persistence with localStorage - Add conversion history with restore functionality - Add URL format validation - Add result statistics (size/lines/time) - Add toast notifications - Add light/dark theme support - Add i18n (Chinese/English auto-detect) - Add responsive mobile layout - Update CMakeLists.txt and main.cpp routing
Mihomo Parser Bridge
bridge/ provides the CGO wrapper that lets SubConverter-Extended reuse
Mihomo's native subscription parser.
Current status
The bridge is integrated into the C++ build:
bridge/converter.goexportsConvertSubscriptionandFreeString.src/parser/mihomo_bridge.cppcalls the exported Go functions and converts Mihomo JSON output into C++ proxy nodes.src/generator/config/nodemanip.cppuses the Mihomo parser whenUSE_MIHOMO_PARSERis defined, then falls back to the legacy parser on parser errors.CMakeLists.txtenablesUSE_MIHOMO_PARSERautomatically when eitherbridge/libmihomo.soorbridge/libmihomo.ais present.
Build modes
Alpine Docker image
The default Dockerfile builds libmihomo.so with go build -buildmode=c-shared.
This is the preferred Alpine path because the Go runtime boundary stays inside
the shared object, avoiding the musl initialization crash seen with static
c-archive linking.
Debian Docker image
docker/Dockerfile.debian builds libmihomo.a with go build -buildmode=c-archive.
This path is kept for glibc-based binary builds where static archive linking is stable and easier to package.
Local development
If your IDE reports that libmihomo.h is missing, build the bridge locally:
cd bridge
bash build.sh
The generated artifacts are:
bridge/libmihomo.hbridge/libmihomo.aorbridge/libmihomo.so, depending on the build path
The Docker build also regenerates:
src/parser/mihomo_schemes.hsrc/parser/param_compat.h
Updating Mihomo
The current checked-in Go module pins the Mihomo module version in go.mod.
When intentionally updating Mihomo, update and verify the bridge from
bridge/:
go get github.com/metacubex/mihomo@<version-or-ref>
go mod tidy
Then regenerate the parser compatibility headers and rebuild the Docker image.
Testing notes
There is no dedicated automated test suite for the bridge yet. Before changing
parser behavior, manually compare representative ss://, vmess://,
trojan://, hysteria2://, and mixed subscriptions against the generated
Clash/Mihomo output.
Recommended future coverage:
- Go unit tests for subscription preprocessing in
converter.go. - C++ tests for
mihomo_bridge.cppJSON conversion and error handling. - Snapshot tests for
/sub?target=clashwith representative node links.
License
The Mihomo parser dependency comes from metacubex/mihomo, which is licensed under the MIT License.
SubConverter-Extended is licensed under GPL-3.0. MIT-licensed code can be used in this GPL-3.0 project, while the combined project remains GPL-3.0 licensed.