sing

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *conf.CoreConfig) (vCore.Core, error)

Types

type DNSConfig

type DNSConfig struct {
	Servers []map[string]interface{} `json:"servers"`
	Rules   []map[string]interface{} `json:"rules"`
}

type GrpcNetworkConfig

type GrpcNetworkConfig struct {
	ServiceName string `json:"serviceName"`
}

type HookServer

type HookServer struct {
	// contains filtered or unexported fields
}

func (*HookServer) ModeList

func (h *HookServer) ModeList() []string

func (*HookServer) RoutedConnection

func (h *HookServer) RoutedConnection(_ context.Context, conn net.Conn, m adapter.InboundContext, _ adapter.Rule, _ adapter.Outbound) net.Conn

func (*HookServer) RoutedPacketConnection

func (h *HookServer) RoutedPacketConnection(_ context.Context, conn N.PacketConn, m adapter.InboundContext, _ adapter.Rule, _ adapter.Outbound) N.PacketConn

type HttpNetworkConfig

type HttpNetworkConfig struct {
	Header struct {
		Type     string           `json:"type"`
		Request  *json.RawMessage `json:"request"`
		Response *json.RawMessage `json:"response"`
	} `json:"header"`
}

type HttpRequest

type HttpRequest struct {
	Version string   `json:"version"`
	Method  string   `json:"method"`
	Path    []string `json:"path"`
	Headers struct {
		Host []string `json:"Host"`
	} `json:"headers"`
}

type HttpupgradeNetworkConfig

type HttpupgradeNetworkConfig struct {
	Path string `json:"path"`
	Host string `json:"host"`
}

type Sing

type Sing struct {
	// contains filtered or unexported fields
}

func (*Sing) AddNode

func (b *Sing) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error

func (*Sing) AddUsers

func (b *Sing) AddUsers(p *core.AddUsersParams) (added int, err error)

func (*Sing) Close

func (b *Sing) Close() error

func (*Sing) DelNode

func (b *Sing) DelNode(tag string) error

func (*Sing) DelUsers

func (b *Sing) DelUsers(users []panel.UserInfo, tag string, info *panel.NodeInfo) error

func (*Sing) GetUserTraffic

func (b *Sing) GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64)

func (*Sing) GetUserTrafficSlice

func (b *Sing) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error)

func (*Sing) Protocols

func (b *Sing) Protocols() []string

func (*Sing) Start

func (b *Sing) Start() error

func (*Sing) Type

func (b *Sing) Type() string

type UserDeleter

type UserDeleter interface {
	DelUsers(uuid []string) error
}

type UserMap

type UserMap struct {
	// contains filtered or unexported fields
}

type WsNetworkConfig

type WsNetworkConfig struct {
	Path    string            `json:"path"`
	Headers map[string]string `json:"headers"`
}

Jump to

Keyboard shortcuts

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