Skip to content

Add support for enrollment links in tlsmirror#3623

Merged
xiaokangwang merged 1 commit intov2fly:masterfrom
xiaokangwang:dev-tlsmirror-enrollment-links-awbwsanowr2opei36zpzcpcvhij0vyy61w56
Feb 18, 2026
Merged

Add support for enrollment links in tlsmirror#3623
xiaokangwang merged 1 commit intov2fly:masterfrom
xiaokangwang:dev-tlsmirror-enrollment-links-awbwsanowr2opei36zpzcpcvhij0vyy61w56

Conversation

@xiaokangwang
Copy link
Copy Markdown
Contributor

(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:

  • Added LinkFromAny and AnyFromLink functions in enrollmentlink.go to convert between protobuf Any messages and strict data URLs with the MIME type application/vnd.v2ray.tlsmirror-enrollment. Only data URLs with this exact MIME type and base64 encoding are accepted.
  • Introduced a new CLI command in clicommand/enrollmentlink_cli.go for converting between JSON and link formats, supporting stdin/stdout and file I/O, and registering the command with the engineering CLI.
  • Updated both client (client.go) and server (server.go) initialization to parse bootstrap ingress/egress URLs using the new strict AnyFromLink function, rejecting empty or invalid URLs and converting them to protobuf Any configs. [1] [2]

Testing and Validation:

  • Added extensive tests in enrollmentlink_test.go to 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:

  • Registered the new CLI command in the main build by updating the imports in main/distro/all/all.go.

@xiaokangwang xiaokangwang force-pushed the dev-tlsmirror-enrollment-links-awbwsanowr2opei36zpzcpcvhij0vyy61w56 branch from 2dee81d to 25a9839 Compare February 16, 2026 19:06
@xiaokangwang xiaokangwang merged commit 6a00cc3 into v2fly:master Feb 18, 2026
37 of 43 checks passed
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