hiddify_extension

package
v0.0.0-...-ec0eb2f Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CountKey      = "count"
	ConsoleKey    = "console"
	ButtonTestKey = "button_test"
)

Variables

View Source
var Resources embed.FS

Embed all translations in the resources directory

Functions

func NewMcrvpn

func NewMcrvpn() ex.Extension

NewMcrvpn initializes a new instance of Mcrvpn with default values

Types

type Mcrvpn

type Mcrvpn struct {
	ex.Base[McrvpnData] // Embedding base extension functionality
	// contains filtered or unexported fields
}

Mcrvpn represents the core functionality of the extension

func (*Mcrvpn) BeforeAppConnect

func (e *Mcrvpn) BeforeAppConnect(hiddifySettings *config.HiddifyOptions, singconfig *option.Options) error

To Modify user's config before connecting, you can use this function

func (*Mcrvpn) Close

func (e *Mcrvpn) Close() error

Stop is called when the extension is closed

func (*Mcrvpn) GetUI

func (e *Mcrvpn) GetUI() ui.Form

GetUI returns the UI form for the extension

func (*Mcrvpn) SubmitData

func (e *Mcrvpn) SubmitData(button string, data map[string]string) error

SubmitData processes and validates form submission data

type McrvpnData

type McrvpnData struct {
	Count int `json:"count"` // Number of counts for the extension
}

McrvpnData holds the data specific to Mcrvpn

Jump to

Keyboard shortcuts

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