Add support for enrollment links in tlsmirror#3623
Merged
xiaokangwang merged 1 commit intov2fly:masterfrom Feb 18, 2026
Conversation
2dee81d to
25a9839
Compare
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.
(Machine Generated Summary:)
This pull request introduces support for strict, MIME-typed data URL encoding and decoding of TLS mirror enrollment links, along with a CLI tool and comprehensive tests. The changes ensure that enrollment links are handled in a robust, well-defined way, and integrate this handling into both client and server configuration paths.
Enrollment Link Handling and CLI Integration:
LinkFromAnyandAnyFromLinkfunctions inenrollmentlink.goto convert between protobufAnymessages and strict data URLs with the MIME typeapplication/vnd.v2ray.tlsmirror-enrollment. Only data URLs with this exact MIME type and base64 encoding are accepted.clicommand/enrollmentlink_cli.gofor converting between JSON and link formats, supporting stdin/stdout and file I/O, and registering the command with the engineering CLI.client.go) and server (server.go) initialization to parse bootstrap ingress/egress URLs using the new strictAnyFromLinkfunction, rejecting empty or invalid URLs and converting them to protobufAnyconfigs. [1] [2]Testing and Validation:
enrollmentlink_test.goto validate round-trip encoding/decoding, strictness of MIME type and encoding, rejection of legacy/invalid formats, and handling of large payloads and extra parameters.Project Integration:
main/distro/all/all.go.