Repository navigation
Conversation
- Hysteria2 links, Clash Meta and sing-box no longer fail for hosts with FinalMask settings - Host QUIC params survive a reload of the NATS host cache
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7 of 11 tasks
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.
Summary
Host-level
final_mask_settingsreachSubscriptionInboundDataas aFinalMaskmodel. That breaks Hysteria2 output twice:_get_hysteria_data_from_finalmaskcalls.get()on the model, so links, Clash Meta and sing-box fail for a Hysteria2 host with a FinalMask:AttributeError: 'FinalMask' object has no attribute 'get'.HostManager._persist_statewritesSubscriptionInboundData.model_dump()(no aliases) to NATS KV. After_load_state_from_cachethe host mask is a dict with model field names (quic_params), so the builders find noquicParamsand dropudpHop,brutalUp/DownandbbrProfile._prepare_subscription_inbound_datanow dumps a hostFinalMaskwithby_alias=True, exclude_none=True, mode="json", so the builders and the KV copy get a dict with Xray field names. The builders are unchanged.Type of change
Checklist
Testing
uv run pytest -q tests/test_subscription_hysteria_finalmask.pySQLALCHEMY_DATABASE_URL=sqlite+aiosqlite:///./test.db uv run pytest -qruff check/ruff format --checkon touched filesThe tests prepare a Hysteria2 host through
_prepare_subscription_inbound_data(core_manager.get_inbound_by_tagmocked), optionally pass it through the same JSON round trip as the KV cache, and check links, Clash Meta and sing-box output for a host mask and for an inbound mask.Screenshots
Not applicable (backend only).
Notes for reviewers
XrayConfiguration._stream_setting_config; the Xray JSON output is the same.devand not touched here: sing-boxserver_portsneedsstart:end, sing-boxup_mbps/down_mbpsmust be integers, and mihomohop-intervaldoes not take anssuffix. The tests do not assert these values.