Documentation
¶
Overview ¶
Package links generates share links and JSON outbound configs from generated sing-box configurations and cheburbox schemas.
Index ¶
- func GenerateLinks(projectRoot string, jpath string, filter Filter, format Format) ([]string, error)
- func Hysteria2Link(info InboundInfo) string
- func Hysteria2OutboundJSON(info InboundInfo) (string, error)
- func VLESSLink(info InboundInfo) string
- func VLESSOutboundJSON(info InboundInfo) (string, error)
- type Filter
- type Format
- type InboundInfo
- type RealityInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateLinks ¶
func GenerateLinks(projectRoot string, jpath string, filter Filter, format Format) ([]string, error)
GenerateLinks produces share links or JSON outbound configs for all matching inbounds.
func Hysteria2Link ¶
func Hysteria2Link(info InboundInfo) string
Hysteria2Link builds a hysteria2:// share URI from the given inbound info.
func Hysteria2OutboundJSON ¶
func Hysteria2OutboundJSON(info InboundInfo) (string, error)
Hysteria2OutboundJSON builds a sing-box Hysteria2 outbound JSON config.
func VLESSLink ¶
func VLESSLink(info InboundInfo) string
VLESSLink builds a vless:// share URI from the given inbound info.
func VLESSOutboundJSON ¶
func VLESSOutboundJSON(info InboundInfo) (string, error)
VLESSOutboundJSON builds a sing-box VLESS outbound JSON config.
Types ¶
type InboundInfo ¶
type InboundInfo struct {
// Common fields.
Server string
Endpoint string
Tag string
Type string // "vless" or "hysteria2".
ListenPort uint16
UserName string
// VLESS-specific.
UUID string
Flow string
Reality *RealityInfo
// Hysteria2-specific.
Password string
PinSHA256 string
ObfsType string
ObfsPassword string
// Common TLS.
ServerName string
ALPN []string
}
InboundInfo holds all data needed to build a share link for one user on one inbound.
func CollectInboundInfos ¶
func CollectInboundInfos(projectRoot string, jpath string, filter Filter) ([]InboundInfo, error)
CollectInboundInfos gathers link data for all matching server/inbound/user combinations under projectRoot.
type RealityInfo ¶
RealityInfo holds VLESS Reality TLS parameters.