libXray

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 27 Imported by: 1

README

libXray

This is an Xray wrapper focusing on improving the experience of Xray-core mobile development.

Features

build.sh

编译脚本。一键生成 xcframework 和 aar。

clash.go

转换 Clash yaml,Clash.Meta yaml 为 Xray Json。

controller.go

试验性的 Android Protect(fd)。

file.go

文件写入。

geo.go

读取 geosite.data,生成类别名称文件,包含 Attribute。

读取 geoip.data,生成类别名称文件。

memory.go

强制 GC。

ping.go

测速。

port.go

获取空闲端口。

share.go

转换 v2rayN 订阅为 Xray Json。

转换 VMessAEAD/VLESS 分享为 Xray Json。

subscription.go

转换 Xray Json 为订阅文本。

uuid.go

转换自定义文本为 uuid。

xray_json.go

Xray 配置的子集,为出口节点添加了 Name 字段,便于 App 内进行解析。

支持 flatten outbounds 。

xray.go

启动和停止 Xray 。

Used By

FoXray

Contributing

yiguo wrote the original source code. Now it belongs to the Xray Community.

Credits

Project X

VMessPing

FreePort

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertXrayJsonToShareText

func ConvertXrayJsonToShareText(xrayPath string, textPath string) string

func CustomUUID

func CustomUUID(text string) string

func GetFreePorts

func GetFreePorts(count int) string

https://github.com/phayes/freeport/blob/master/freeport.go GetFreePort asks the kernel for free open ports that are ready to use.

func LoadGeoData

func LoadGeoData(dir string) string

func ParseShareText

func ParseShareText(textPath string, xrayPath string) string

func Ping

func Ping(datDir string, config string, timeout int, url string, times int) string

func RegisterDialerController

func RegisterDialerController(controller DialerController)

func RunXray

func RunXray(datDir string, configPath string, maxMemory int64) string

func StopXray

func StopXray() string

func XrayVersion

func XrayVersion() string

Types

type DialerController

type DialerController interface {
	FdCallback(int) bool
}

Jump to

Keyboard shortcuts

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