Fix logging configuration for XRay
This commit is contained in:
parent
8ecde90bc7
commit
53fa280037
1 changed files with 3 additions and 8 deletions
|
|
@ -117,14 +117,9 @@ class Xray : Protocol() {
|
||||||
val xrayJsonConfig = config.getJSONObject("xray_config_data")
|
val xrayJsonConfig = config.getJSONObject("xray_config_data")
|
||||||
val xrayConfig = parseConfig(config, xrayJsonConfig)
|
val xrayConfig = parseConfig(config, xrayJsonConfig)
|
||||||
|
|
||||||
// for debug
|
(xrayJsonConfig.optJSONObject("log") ?: JSONObject().also { xrayJsonConfig.put("log", it) })
|
||||||
// xrayJsonConfig.getJSONObject("log").put("loglevel", "debug")
|
.put("loglevel", "warning")
|
||||||
xrayJsonConfig.getJSONObject("log").put("loglevel", "warning")
|
.put("access", "none") // disable access log
|
||||||
// disable access log
|
|
||||||
xrayJsonConfig.getJSONObject("log").put("access", "none")
|
|
||||||
|
|
||||||
// replace socks address
|
|
||||||
// (xrayJsonConfig.getJSONArray("inbounds")[0] as JSONObject).put("listen", "::1")
|
|
||||||
|
|
||||||
start(xrayConfig, xrayJsonConfig.toString(), vpnBuilder, protect)
|
start(xrayConfig, xrayJsonConfig.toString(), vpnBuilder, protect)
|
||||||
state.value = CONNECTED
|
state.value = CONNECTED
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue