server

package
v0.33.12 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Bridge  *bridge.Bridge
	RunList sync.Map //map[int]interface{}

	HttpProxyCache = index.NewAnyIntIndex()
)

Functions

func AddTask

func AddTask(t *file.Tunnel) error

AddTask add task

func DealBridgeTask

func DealBridgeTask()

DealBridgeTask get bridge command

func DelClientConnect

func DelClientConnect(clientId int)

DelClientConnect close the client

func DelTask

func DelTask(id int) error

DelTask delete task

func DelTunnelAndHostByClientId

func DelTunnelAndHostByClientId(clientId int, justDelNoStore bool)

DelTunnelAndHostByClientId delete all host and tasks by client id

func GetClientList

func GetClientList(start, length int, search, sortField, order string, clientId int) (list []*file.Client, cnt int)

GetClientList get client list

func GetCurrentYear

func GetCurrentYear() int

func GetDashboardData

func GetDashboardData(force bool) map[string]interface{}

func GetHostList

func GetHostList(start, length, clientId int, search, sortField, order string) (list []*file.Host, cnt int)

GetHostList get client list

func GetMinVersion

func GetMinVersion() string

func GetTunnel

func GetTunnel(start, length int, typeVal string, clientId int, search string, sortField string, order string) ([]*file.Tunnel, int)

GetTunnel get task list by page num

func GetVersion

func GetVersion() string

func InitDashboardData

func InitDashboardData()

func InitFromDb added in v0.33.12

func InitFromDb()

InitFromDb init task from db

func NewMode

func NewMode(Bridge *bridge.Bridge, c *file.Tunnel) proxy.Service

NewMode new a server by mode name

func PingClient added in v0.33.12

func PingClient(id int, addr string) int

func StartNewServer

func StartNewServer(bridgePort int, cnf *file.Tunnel, bridgeType string, bridgeDisconnect int)

StartNewServer start a new server

func StartTask

func StartTask(id int) error

StartTask start task

func StopServer

func StopServer(id int) error

StopServer stop server

Types

type WebServer added in v0.33.12

type WebServer struct {
	proxy.BaseServer
	// contains filtered or unexported fields
}

func NewWebServer added in v0.33.12

func NewWebServer(bridge *bridge.Bridge) *WebServer

func (*WebServer) Close added in v0.33.12

func (s *WebServer) Close() error

func (*WebServer) Start added in v0.33.12

func (s *WebServer) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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