Documentation
¶
Overview ¶
Package link builds client share-links from a user + settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hysteria2 ¶
Hysteria2 builds a hysteria2:// share link.
Format matches what x-ui/3x-ui and similar Xray-based panels emit and that clients such as v2rayNG / NekoBox (Xray core) accept:
hysteria2://<pw>@<host>:<port>?type=hysteria&security=tls&sni=<sni>
&alpn=h3&fm=<quicParams>#<label>
fm carries the port-hopping quicParams JSON and is double-URL-encoded because Xray decodes query params twice before consuming the value. The JSON is kept COMPACT (no spaces/newlines): Go's url.QueryEscape encodes a space as "+", which after the second encode becomes "%2B" and decodes back to a literal "+" on the client — corrupting the JSON. No whitespace ⇒ no ambiguity.
func Label ¶
Label is the node name appended after '#' in share links / used as the sing-box/Clash node tag. It's the admin-configured custom name for the protocol, or the default protocol label when unset (see Settings.ProtoLabel). The user name, when requested, goes into the subscription title instead (see sub.SubTitle).
func Reality ¶
Reality builds a vless:// share link for VLESS + gRPC + REALITY.
vless://<uuid>@<host>:<port>?encryption=none&security=reality&type=grpc
&serviceName=<svc>&mode=gun&pbk=<pub>&sid=<sid>&sni=<dest>&fp=<fp>#<label>
Types ¶
This section is empty.