adapter

package
v0.0.0-...-f0a2dc7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AutoSelect = "Auto - UrlTest"
)
View Source
var TemplateFS embed.FS

Functions

func RemoveEmptyString

func RemoveEmptyString(arr []string) []string

RemoveEmptyString 切片去除空值

func SortGroups

func SortGroups(groups []proxy.Group, nodes []string, tags map[string][]string, defaultName string) []proxy.Group

SortGroups sorts the provided slice of proxy groups by their names.

Types

type Adapter

type Adapter struct {
	proxy.Adapter
}

func NewAdapter

func NewAdapter(cfg *Config) *Adapter

func (*Adapter) BuildClash

func (m *Adapter) BuildClash(uuid string) ([]byte, error)

BuildClash generates a Clash configuration for the given UUID.

func (*Adapter) BuildGeneral

func (m *Adapter) BuildGeneral(uuid string) []byte

BuildGeneral generates a general configuration for the given UUID.

func (*Adapter) BuildLoon

func (m *Adapter) BuildLoon(uuid string) []byte

BuildLoon generates a Loon configuration for the given UUID.

func (*Adapter) BuildQuantumultX

func (m *Adapter) BuildQuantumultX(uuid string) string

BuildQuantumultX generates a Quantumult X configuration for the given UUID.

func (*Adapter) BuildShadowrocket

func (m *Adapter) BuildShadowrocket(uuid string, userInfo shadowrocket.UserInfo) []byte

func (*Adapter) BuildSingbox

func (m *Adapter) BuildSingbox(uuid string) ([]byte, error)

BuildSingbox generates a Singbox configuration for the given UUID.

func (*Adapter) BuildSurfboard

func (m *Adapter) BuildSurfboard(siteName string, user surfboard.UserInfo) []byte

BuildSurfboard generates a Surfboard configuration for the given site name and user info.

func (*Adapter) BuildSurge

func (m *Adapter) BuildSurge(siteName string, user surge.UserInfo) []byte

BuildSurge generates a Surge configuration for the given UUID and site name.

func (*Adapter) BuildV2rayN

func (m *Adapter) BuildV2rayN(uuid string) []byte

BuildV2rayN generates a V2rayN configuration for the given UUID.

type Config

type Config struct {
	Nodes []*server.Server
	Rules []*server.RuleGroup
	Tags  map[string][]*server.Server
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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