This is an Xray wrapper focusing on improving the experience of Xray-core mobile development.
This repository has very limited maintainers. If you're not reporting a bug, or making a PR, your question will most likely be ignored.
This lib does not guarantee the stability of the api, you need to adapt it by yourself.
If your issue is about some Platform development, like iOS or Android, it will be just closed.
From 3.0.0, all apis have changed to base64-encoded-string-based, including paramters and return value.
The reasons are as bellow.
We must be careful when using cgo. Always remember to free c-strings we pass to cgo and get from cgo. If there are many string paramters in the function, it will be a nightmare. So we just keep one string parameter and one string return value for every function.
The string paramter and string return value may be transfered between languages, like go -> swift/kotlin/cpp -> dart, using their ffi. Some characters may be wrong when they are encoded and decoded many times. So encoding string to ascii characters will be a better choice, and we just choose base64.
parse Clash and Clash.Meta config.
write data to file.
convert v2rayN subscriptions to Xray Json.
convert VMessAEAD/VLESS sharing protocol to Xray Json.
ping xray outbound.
try to control the max memory.
convert Xray Json to subscription links.
get free port.
convert VMessQRCode to Xray Json.
subset of Xray config, add name field to outbound.
support flattening outbounds.
read geosite.dat and geoip.dat, generate json file and count rules, including Attribute.
test the delay.
read the
convert custom text to uuid.
test Xray config.
start and stop Xray instance.
build libXray, currently support android and apple.
It will always use the latest Xray-core.
experimental Android support.
register a controller to protect all connections.
Because there is no api to reset effectiveListener, Only run them once when app running.
experimental Android support.
register a controller to protect default dns queries.
If the xray server address is a domain, InitDns will be useful to resolve the "first connection" problem.
export nodep.
export xray.