Skip to content

Commit d136196

Browse files
committed
ui: align Xray wording casing
1 parent d83b8e6 commit d136196

16 files changed

Lines changed: 22 additions & 22 deletions

File tree

app/src/main/assets/aboutlibraries.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
{
264264
"uniqueId": "github:XTLS/Xray-core",
265265
"artifactVersion": "v26.6.1",
266-
"name": "xray-core",
266+
"name": "Xray-core",
267267
"description": "An open platform for proxy and anti-censorship networking.",
268268
"website": "https://github.com/XTLS/Xray-core",
269269
"scm": {

app/src/main/kotlin/app/AppStateModels.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ enum class ResourceFileKind(
6060
GeoIp,
6161
GeoSite,
6262
GeoIpOnlyCnPrivate -> fileName
63-
XrayCore -> "xray-core $XrayCoreVersion"
63+
XrayCore -> "Xray-core $XrayCoreVersion"
6464
}
6565
}
6666

app/src/main/kotlin/engine/root/RootBootScript.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private fun <Config : RootModeStartConfig> Config.buildRootStartupScript(
5959
)
6060
appendScript("section \"Prepare core logs\"")
6161
append(root.coreLogPaths.buildPrepareCoreLogFilesCommand())
62-
appendScript("section \"Start xray-core\"")
62+
appendScript("section \"Start Xray-core\"")
6363
append(root.buildBootStartDaemonCommand())
6464
val postCoreStartCommand = buildPostCoreStartCommand(this@buildRootStartupScript)
6565
if (postCoreStartCommand.isNotBlank()) {
@@ -146,7 +146,7 @@ private fun <Config : RootModeStartConfig> StringBuilder.appendRootStartupPreamb
146146
dump_failure_diagnostics() {
147147
diagnostics_dumped=1
148148
echo
149-
echo "Recent xray error log:"
149+
echo "Recent Xray error log:"
150150
tail -n 80 $${config.root.coreLogPaths.errorLogPath.shellQuote()} || true
151151
""",
152152
)

app/src/main/kotlin/engine/root/RootModeRunner.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal abstract class RootModeRunner<Config : RootModeStartConfig>(
2828
writeRootConfigFile(config.root)
2929
prepareModeRuntimeFiles(config)
3030
runRootCommand(config.root.buildPrepareRuntimeCommand(), "Failed to prepare $modeName environment")
31-
runRootCommand(config.root.buildStartDaemonCommand(), "Failed to start xray-core daemon")
31+
runRootCommand(config.root.buildStartDaemonCommand(), "Failed to start Xray-core daemon")
3232
runRootCommandIfNotBlank(
3333
command = buildPostCoreStartCommand(config),
3434
failureMessage = "Failed to start $modeName helper runtime",
@@ -39,7 +39,7 @@ internal abstract class RootModeRunner<Config : RootModeStartConfig>(
3939
failStartup(config, readinessCheck.failureMessage)
4040
}
4141
if (!isRunning(config.root.runtimeLayout)) {
42-
failStartup(config, "xray-core process exited or did not match the expected $modeName runtime state")
42+
failStartup(config, "Xray-core process exited or did not match the expected $modeName runtime state")
4343
}
4444
if (!isModeRuntimeRunning(config)) {
4545
failStartup(config, "$modeName helper runtime exited or did not match the expected runtime state")
@@ -84,7 +84,7 @@ internal abstract class RootModeRunner<Config : RootModeStartConfig>(
8484
if (command.isBlank()) {
8585
return@withContext
8686
}
87-
runRootCommand(command, "Failed to prepare xray log files")
87+
runRootCommand(command, "Failed to prepare Xray log files")
8888
}
8989

9090
suspend fun ownsRuntime(runtimeLayout: RootRuntimeLayout): Boolean = withContext(Dispatchers.IO) {
@@ -164,7 +164,7 @@ internal abstract class RootModeRunner<Config : RootModeStartConfig>(
164164
val errorLog = config.root.collectRootErrorLogTail(rootAccess)
165165
val processDiagnostics = config.root.collectRootProcessDiagnostics(rootAccess)
166166
val modeDiagnostics = collectReadinessDiagnostics(config)
167-
runRootCommand(buildStopCommand(config.root.runtimeLayout), "Failed to clean up after xray-core startup failure")
167+
runRootCommand(buildStopCommand(config.root.runtimeLayout), "Failed to clean up after Xray-core startup failure")
168168
error(
169169
buildRootDiagnosticMessage(
170170
message,

app/src/main/kotlin/engine/root/RootRunnerScript.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ internal fun RootStartConfig.buildBootStartDaemonCommand(): String {
110110
export XRAY_LOCATION_ASSET=$${runtimeLayout.dataDir.shellQuote()}
111111
ulimit -SHn 1000000 || true
112112
chmod 755 $${setuidgidPath.shellQuote()}
113-
echo "+ start xray-core as uid=$${RootXrayUid} gid=$${RootXrayGid}"
114-
echo "+ xray stdout/stderr: $${coreLogPaths.errorLogPath.shellQuote()}"
113+
echo "+ start Xray-core as uid=$${RootXrayUid} gid=$${RootXrayGid}"
114+
echo "+ Xray stdout/stderr: $${coreLogPaths.errorLogPath.shellQuote()}"
115115
$${setuidgidPath.shellQuote()} $${RootXrayUid.toString().shellQuote()} $${RootXrayGid.toString().shellQuote()} $${runtimeLayout.xrayCorePath.shellQuote()} run -config $${configPath.shellQuote()} >> $${coreLogPaths.errorLogPath.shellQuote()} 2>&1 < /dev/null &
116116
echo $! > $${runtimeLayout.pidPath.shellQuote()}
117-
echo "xray-core pid: $(cat $${runtimeLayout.pidPath.shellQuote()})"
117+
echo "Xray-core pid: $(cat $${runtimeLayout.pidPath.shellQuote()})"
118118
""",
119119
)
120120
}

app/src/main/kotlin/engine/tproxy/TproxyRootRunner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal class TproxyRootRunner(
3636
return RootReadinessCheck(
3737
description = "tproxy-in port ${config.tproxyPort}",
3838
command = buildRootPortReadyCommand(config.tproxyPort),
39-
failureMessage = "xray-core started but tproxy-in port ${config.tproxyPort} is not ready",
39+
failureMessage = "Xray-core started but tproxy-in port ${config.tproxyPort} is not ready",
4040
)
4141
}
4242

app/src/main/kotlin/engine/tun2socks/Tun2SocksRootRunner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ internal class Tun2SocksRootRunner(
6161
description = "SOCKS5 port $socksPort and TUN device asterisk0",
6262
command = buildRootPortReadyCommand(socksPort) +
6363
" && ip link show dev 'asterisk0' >/dev/null 2>&1",
64-
failureMessage = "xray-core started but SOCKS5 port $socksPort or TUN device asterisk0 is not ready",
64+
failureMessage = "Xray-core started but SOCKS5 port $socksPort or TUN device asterisk0 is not ready",
6565
)
6666
}
6767

app/src/main/kotlin/engine/xray/XrayConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private fun logGeneratedXrayConfig(config: JsonObject) {
106106
val chunks = json.chunked(LogChunkSize)
107107
chunks.forEachIndexed { index, chunk ->
108108
val progress = if (chunks.size == 1) "" else " (${index + 1}/${chunks.size})"
109-
AndroidAppLogger.info(LogTag, "Generated xray config JSON$progress:\n$chunk")
109+
AndroidAppLogger.info(LogTag, "Generated Xray config JSON$progress:\n$chunk")
110110
}
111111
}
112112

app/src/main/kotlin/engine/xray/XrayConfigSupport.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ internal fun Context.prepareXrayCoreLogPaths(): XrayCoreLogPaths {
9292
internal fun XrayCoreLogPaths.logDirectoryPath(): String {
9393
return File(errorLogPath).parentFile?.absolutePath
9494
?: File(accessLogPath).parentFile?.absolutePath
95-
?: error("xray log directory is unavailable")
95+
?: error("Xray log directory is unavailable")
9696
}
9797

9898
internal fun Iterable<String>.toJsonStringArray(): JsonArray {

app/src/main/kotlin/engine/xray/XrayCoreLogRuntime.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ internal fun clearCoreLogFilesAsApp(logPaths: List<String>, logTag: String) {
5252
writeText("")
5353
}
5454
}.onFailure { error ->
55-
AndroidAppLogger.warn(logTag, "Failed to clear xray log file: $logPath", error)
55+
AndroidAppLogger.warn(logTag, "Failed to clear Xray log file: $logPath", error)
5656
}
5757
}
5858
}

0 commit comments

Comments
 (0)