clashconfig

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAppsFromClashRules

func ExtractAppsFromClashRules(reader io.Reader) ([]*configs.AppId, error)

ExtractAppsFromClashRules parses files containing app rules and extracts configs.AppId entries. It supports both plain text format (PROCESS-NAME and PROCESS-PATH rules) and YAML format with payload array.

func ExtractCidrFromClashRules

func ExtractCidrFromClashRules(reader io.Reader) ([]*geo.CIDR, error)

ExtractCidrFromClashRules parses files containing CIDR rules and extracts geo.CIDR entries. It supports both plain text format (IP-CIDR and IP-CIDR6 rules) and YAML format with payload array.

func ExtractDomainsFromClashRules

func ExtractDomainsFromClashRules(reader io.Reader) ([]*geo.Domain, error)

ExtractDomainsFromClashRules parses files containing domain rules and extracts geo.Domain entries. It supports both plain text format (DOMAIN and DOMAIN-SUFFIX rules) and YAML format with payload array.

Types

type PayloadConfig

type PayloadConfig struct {
	Payload []string `yaml:"payload"`
}

Jump to

Keyboard shortcuts

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