singapi

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func URLTest

func URLTest(ctx context.Context, link string, detour N.Dialer) (t int16, err error)

Copied Function from singbox

Types

type SingAPI

type SingAPI struct {
	sbox.Sboxcontroller
	// contains filtered or unexported fields
}

func NewsingAPI

func NewsingAPI(ctx context.Context, opt option.Options, logger *zap.Logger) (*SingAPI, error)

func (*SingAPI) AddUser

func (s *SingAPI) AddUser(suser *sbox.Userconfig) (sbox.Sboxstatus, error)

func (*SingAPI) AddUserReset

func (s *SingAPI) AddUserReset(suser *sbox.Userconfig) (sbox.Sboxstatus, error)

func (*SingAPI) Close

func (s *SingAPI) Close() error

func (*SingAPI) CloseConns

func (s *SingAPI) CloseConns(suser *sbox.Userconfig) error

func (*SingAPI) GetLogChan

func (s *SingAPI) GetLogChan() chan any

func (*SingAPI) GetstatusUser

func (s *SingAPI) GetstatusUser(suser *sbox.Userconfig) (sbox.Sboxstatus, error)

func (*SingAPI) RefreshUrlTest

func (s *SingAPI) RefreshUrlTest()

func (*SingAPI) RemoveAllRuleForuser

func (s *SingAPI) RemoveAllRuleForuser(user string)

func (*SingAPI) RemoveUser

func (s *SingAPI) RemoveUser(suser *sbox.Userconfig) (sbox.Sboxstatus, error)

func (*SingAPI) SetLogChan

func (s *SingAPI) SetLogChan(logchan chan any)

func (*SingAPI) Start

func (s *SingAPI) Start() error

func (*SingAPI) UrlTest

func (s *SingAPI) UrlTest(outtag string) (int16, error)

Jump to

Keyboard shortcuts

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