node

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePrivate

func EncodePrivate(privKey *ecdsa.PrivateKey) (string, error)

Types

type Controller

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

func NewController

func NewController(core *vCore.XrayCore, api *panel.NodeClient, info *panel.NodeInfo) *Controller

NewController return a Node controller with default parameters.

func (*Controller) Close

func (c *Controller) Close() error

func (*Controller) Prepare added in v1.1.13

func (c *Controller) Prepare() error

Prepare completes network requests and builds the inbound before stopping a running node. The cached certificate and user snapshot also support rollback.

func (*Controller) Start

func (c *Controller) Start() error

func (*Controller) Stop added in v1.1.13

func (c *Controller) Stop() error

Stop releases listeners while retaining prepared configuration, users, limiters and pending traffic so Start can restore service without the panel.

type Lego

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

func NewLego

func NewLego(info *panel.NodeInfo) (*Lego, error)

func (*Lego) CreateCert

func (l *Lego) CreateCert() (err error)

func (*Lego) RenewCert

func (l *Lego) RenewCert() (bool, error)

func (*Lego) SetProvider

func (l *Lego) SetProvider() error

type Node

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

func New

func New(core *vCore.XrayCore, config *conf.Conf, serverconfig *panel.ServerConfigResponse) (*Node, error)

func (*Node) Close

func (n *Node) Close()

func (*Node) FlushTraffic added in v1.1.13

func (n *Node) FlushTraffic(ctx context.Context) error

FlushTraffic attempts final delivery after Stop has collected the last batch.

func (*Node) InheritTraffic added in v1.1.13

func (n *Node) InheritTraffic(old *Node)

InheritTraffic keeps unacknowledged reports even if a protocol is removed.

func (*Node) Prepare added in v1.1.13

func (n *Node) Prepare() error

func (*Node) Start

func (n *Node) Start() error

func (*Node) Stop added in v1.1.13

func (n *Node) Stop() error

type User

type User struct {
	Email        string                 `json:"Email"`
	Registration *registration.Resource `json:"Registration"`

	KeyEncoded string `json:"Key"`
	// contains filtered or unexported fields
}

func NewLegoUser

func NewLegoUser(path string, email string) (*User, error)

NewLegoUser preserves the public helper used by callers that use the production ACME directory.

func (*User) DecodePrivate

func (u *User) DecodePrivate(pemEncodedPriv string) (*ecdsa.PrivateKey, error)

func (*User) GetEmail

func (u *User) GetEmail() string

func (*User) GetPrivateKey

func (u *User) GetPrivateKey() crypto.PrivateKey

func (*User) GetRegistration

func (u *User) GetRegistration() *registration.Resource

func (*User) Load

func (u *User) Load(path string) error

func (*User) Save

func (u *User) Save(path string) error

Jump to

Keyboard shortcuts

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