-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
Xray-core added TUN inbound support for iOS in this PR:
XTLS/Xray-core#5612
Readme states that:
Set the environment variable
xray.tun.fd(orXRAY_TUN_FD) to the fd number before starting Xray. This can be done from Swift/Objective-C or by exposing a Go function via gomobile bindings.
I think we could add this into xray_wrapper.go when xray-core gets a new stable release because lots of iOS clients probably use libXray.
Something like this:
# import few more things:
"os"
"strconv"
...
// SetTunFd sets the TUN file descriptor for iOS.
// Call this BEFORE RunXray/RunXrayFromJSON.
func SetTunFd(fd int32) {
os.Setenv("XRAY_TUN_FD", strconv.Itoa(int(fd)))
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels