v2rayn

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtocolForConfigType

func ProtocolForConfigType(t int) (string, bool)

func Redact

func Redact(input string) string

Types

type Discovery

type Discovery struct {
	Root       string
	DBPath     string
	ConfigPath string
	BinConfig  string
	Valid      bool
}

func Discover

func Discover(root string) (Discovery, error)

type ImportedEndpoint

type ImportedEndpoint struct {
	Protocol string `json:"protocol"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Label    string `json:"label,omitempty"`
	SubGroup string `json:"sub_group,omitempty"`
	Source   string `json:"source"`
	// RawURI preserves the original share link in memory for explicit share-link
	// exports. It is intentionally omitted from normal JSON/import output because
	// share links can contain credentials.
	RawURI string `json:"-"`
}

func NewImported

func NewImported(protocol, host string, port int, label, subgroup, source string) (ImportedEndpoint, bool)

func ParseContent

func ParseContent(content string) []ImportedEndpoint

func ParseLine

func ParseLine(line string) (ImportedEndpoint, bool)

func ParseWireGuardINI

func ParseWireGuardINI(content string) []ImportedEndpoint

func ReadProfiles

func ReadProfiles(dbPath string) ([]ImportedEndpoint, error)

func (ImportedEndpoint) ToEndpoint

func (e ImportedEndpoint) ToEndpoint() endpoint.Endpoint

func (ImportedEndpoint) Validate

func (e ImportedEndpoint) Validate() error

func (ImportedEndpoint) WithRawURI added in v1.1.0

func (e ImportedEndpoint) WithRawURI(raw string) ImportedEndpoint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL