xray

package module
v0.0.0-...-d6ac322 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: AGPL-3.0 Imports: 79 Imported by: 0

README

Ratte-Core-Xray

A Xray-Core plugin for Ratte.
The project stay under development, so can not use for now.

Todo

  • Impl limiter
  • Impl rule checker
  • unit testing

Thanks

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoLoadRawMessage

type AutoLoadRawMessage json.RawMessage

func (*AutoLoadRawMessage) UnmarshalJSON

func (j *AutoLoadRawMessage) UnmarshalJSON(data []byte) error

type ExpendNodeOptions

type ExpendNodeOptions struct {
	SendIp      string          `mapstructure:"SendIp"`
	RawOutbound json.RawMessage `mapstructure:"RawOutbound"`
	RawInbound  json.RawMessage `mapstructure:"RawInbound"`
}

type Xray

type Xray struct {
	Server *xc.Instance
	// contains filtered or unexported fields
}

Xray Structure

func NewXray

func NewXray() *Xray

func (*Xray) AddNode

func (c *Xray) AddNode(p *core.AddNodeParams) (err error)

func (*Xray) AddUsers

func (c *Xray) AddUsers(p *core.AddUsersParams) (err error)

func (*Xray) Close

func (c *Xray) Close() (err error)

Close the core

func (*Xray) CustomMethod

func (c *Xray) CustomMethod(method string, args any, reply *any) error

func (*Xray) DelNode

func (c *Xray) DelNode(name string) (err error)

func (*Xray) DelUsers

func (c *Xray) DelUsers(p *core.DelUsersParams) (err error)

func (*Xray) GetUserTraffic

func (c *Xray) GetUserTraffic(p *core.GetUserTrafficParams) *core.GetUserTrafficResponse

func (*Xray) Protocols

func (c *Xray) Protocols() []string

func (*Xray) ResetUserTraffic

func (c *Xray) ResetUserTraffic(p *core.ResetUserTrafficParams) (err error)

func (*Xray) Start

func (c *Xray) Start(dataPath string, config []byte) (err error)

Start the Xray

func (*Xray) Type

func (c *Xray) Type() string

type XrayConfig

type XrayConfig struct {
	AssetPath string             `json:"AssetPath"`
	Log       AutoLoadRawMessage `json:"Log"`
	Dns       AutoLoadRawMessage `json:"Dns"`
	Inbound   AutoLoadRawMessage `json:"Inbound"`
	Outbound  AutoLoadRawMessage `json:"Outbound"`
	Route     AutoLoadRawMessage `json:"Route"`
	Policy    AutoLoadRawMessage `json:"Policy"`
}

func NewXrayConfig

func NewXrayConfig() *XrayConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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