model

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CountryChineseName = map[string]string{}/* 258 elements not displayed */
View Source
var CountryEnglishName = map[string]string{}/* 253 elements not displayed */
View Source
var CountryFlag = map[string]string{}/* 259 elements not displayed */
View Source
var CountryISO = map[string]string{}/* 258 elements not displayed */

Functions

func GetSupportProxyTypes

func GetSupportProxyTypes(clashType ClashType) map[string]bool

Types

type ClashType

type ClashType int
const (
	Clash ClashType = 1 + iota
	ClashMeta
)

type ConvertConfig added in v1.0.0

type ConvertConfig struct {
	ClashType           ClashType            `json:"clashType" binding:"required"`
	Subs                []string             `json:"subscriptions" binding:""`
	Proxies             []string             `json:"proxies" binding:""`
	Refresh             bool                 `json:"refresh" binding:""`
	Template            string               `json:"template" binding:""`
	RuleProviders       []RuleProviderStruct `json:"ruleProviders" binding:""`
	Rules               []RuleStruct         `json:"rules" binding:""`
	AutoTest            bool                 `json:"autoTest" binding:""`
	Lazy                bool                 `json:"lazy" binding:""`
	Sort                string               `json:"sort" binding:""`
	Remove              string               `json:"remove" binding:""`
	Replace             map[string]string    `json:"replace" binding:""`
	NodeListMode        bool                 `json:"nodeList" binding:""`
	IgnoreCountryGrooup bool                 `json:"ignoreCountryGroup" binding:""`
	UserAgent           string               `json:"userAgent" binding:""`
	UseUDP              bool                 `json:"useUDP" binding:""`
}

func ParseConvertQuery added in v1.0.0

func ParseConvertQuery(c *gin.Context) (ConvertConfig, error)

type RuleProviderStruct

type RuleProviderStruct struct {
	Behavior string `json:"behavior" binding:""`
	Url      string `json:"url" binding:""`
	Group    string `json:"group" binding:""`
	Prepend  bool   `json:"prepend" binding:""`
	Name     string `json:"name" binding:""`
}

type RuleStruct

type RuleStruct struct {
	Rule    string `json:"rule" binding:""`
	Prepend bool   `json:"prepend" binding:""`
}
type ShortLink struct {
	ID              string        `gorm:"unique"`
	Config          ConvertConfig `gorm:"serializer:json"`
	Password        string
	LastRequestTime int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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