x3ui

package
v0.0.0-...-740e771 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeX3uiClient

func InitializeX3uiClient(localPort int, username, password string, logger *slog.Logger) (*x3client.Client, error)

InitializeX3uiClient creates a new x3ui client connected via the SSH tunnel

Types

type ServerHandler

type ServerHandler struct {
	SSHKeyPath string
	// contains filtered or unexported fields
}

func NewServerHandler

func NewServerHandler(sshKeyPath string, servers []database.Server, logger *slog.Logger) *ServerHandler

func (*ServerHandler) Close

func (sh *ServerHandler) Close()

func (*ServerHandler) CreateInbound

func (sh *ServerHandler) CreateInbound(server *database.Server) (*x3client.Inbound, error)

func (*ServerHandler) GetClient

func (sh *ServerHandler) GetClient(server *database.Server) (*x3client.Client, error)

func (*ServerHandler) StartSSHPortForward

func (sh *ServerHandler) StartSSHPortForward(server *database.Server) (*ssh.Client, int, error)

StartSSHPortForward sets up an SSH connection with port forwarding using SSH key authentication

Jump to

Keyboard shortcuts

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