You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-19Lines changed: 7 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,11 +40,8 @@ Compile script. It is recommended to always use this script to compile libXray.
40
40
41
41
depends on git and go.
42
42
43
-
By default, the build script does not clone [Xray-core](https://github.com/XTLS/Xray-core). It uses Go modules and pins Xray-core to tag `v26.6.27` (recorded by Go as the matching pseudo-version).
43
+
By default, the build script does not clone [Xray-core](https://github.com/XTLS/Xray-core). It uses Go modules and pins Xray-core to main commit `d5bc58dc` through its pseudo-version.
44
44
Pass the optional `local` argument to use an existing local checkout at `../Xray-core` through a Go module `replace`.
45
-
Linux and Windows builds also produce a small desktop wrapper executable:
46
-
`bin/xray` or `bin/xray.exe`. The wrapper accepts `-configPath` pointing to a
47
-
`LibXrayInvokeRequest` JSON file whose method is `runXray`.
48
45
49
46
### Usage
50
47
@@ -132,11 +129,6 @@ The request is a JSON object:
132
129
{
133
130
"apiVersion": 1,
134
131
"method": "runXray",
135
-
"env": {
136
-
"xray.location.asset": "/path/to/dat",
137
-
"xray.location.cert": "/path/to/dat",
138
-
"xray.tun.fd": "123"
139
-
},
140
132
"payload": {
141
133
"configPath": "/path/to/config.json"
142
134
}
@@ -155,16 +147,12 @@ The response is a JSON object:
155
147
156
148
Design notes:
157
149
158
-
1.`Invoke.env` supports only fixed Xray-core runtime environment keys:
159
-
`xray.location.asset`, `xray.location.cert`, and `xray.tun.fd`.
160
-
2. Non-empty `env` fields are set on the process before the method runs.
161
-
Missing fields are not unset and old values are not restored.
162
-
3.`xray.json.strict`, `xray.location.config`, and `xray.location.confdir` are
163
-
load-stage process environment variables and cannot be supplied through
164
-
`Invoke.env`.
165
-
4.`SetTunFd` has been removed. Set the `"xray.tun.fd"` key in the request
166
-
`env` object when the fd is only known at runtime.
167
-
5.`countGeoData` is not backed by an Xray config, so its `datDir` is passed in
150
+
1.`Invoke` does not accept an `env` field. Xray-core runtime environment
151
+
options belong in the root `env` object of the Xray config.
152
+
2.`SetTunFd` has been removed. When the fd is only known at runtime, write
153
+
`xray.tun.fd` into the Xray config root `env` object before calling
154
+
`runXray`.
155
+
3.`countGeoData` is not backed by an Xray config, so its `datDir` is passed in
0 commit comments