Skip to content

Commit

Permalink
xray 1.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
arm64v8a committed Dec 3, 2022
1 parent 9af635c commit 7752aea
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app_xray/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ setupAll()
android {
defaultConfig {
applicationId = "moe.matsuri.plugin.xray"
versionCode = 8
versionName = "v1.6.4-1"
versionCode = 9
versionName = "v1.6.5-1"
}
}
2 changes: 1 addition & 1 deletion download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ unzip_singbox() {
}

download_xray() {
VERSION="v1.6.4"
VERSION="v1.6.5"
mkdir_libs "app_xray/libs"

curl -Lso xray.zip "https://github.com/XTLS/Xray-core/releases/download/$VERSION/Xray-android-arm64-v8a.zip"
Expand Down
4 changes: 2 additions & 2 deletions js/plugin_xray/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export function nekoProtocol(protocolId) {
export function nekoAbout() {
switch (LANG_TR()) {
case "zh_CN":
return "这个插件是实验性的。如果在使用过程中遇到任何问题,请自行解决。"
return "使用 Xray 内核提供 VLESS 等协议的实验性支持,效果未知。\n如果在使用过程中遇到任何问题,请自行解决。"
default:
return "This plugin is experimental. If you have any problems during use, please solve them yourself."
return "Experimental support for protocols such as VLESS using the Xray core, effects unknown. \nIf you have any problems during use, please solve them yourself."
}
}

Expand Down
24 changes: 17 additions & 7 deletions js/plugin_xray/vless.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class vlessClass {
this.defaultSharedStorage.serverSecurity = "none"
this.defaultSharedStorage.grpcMultiMode = false
// tls
this.defaultSharedStorage.utlsFingerprint = ""
this.defaultSharedStorage.serverSNI = ""
this.defaultSharedStorage.serverALPN = ""
this.defaultSharedStorage.serverCertificates = ""
Expand Down Expand Up @@ -245,6 +246,17 @@ class vlessClass {
{
"key": "serverSecurityCategory",
"preferences": [
{
"type": "SimpleMenuPreference",
"key": "utlsFingerprint",
"entries": {
"": "",
"chrome": "chrome",
"firefox": "firefox",
"safari": "safari",
"randomized": "randomized",
}
},
{
"type": "EditTextPreference",
"key": "serverSNI",
Expand Down Expand Up @@ -396,13 +408,10 @@ class vlessClass {
neko.setPreferenceVisibility("serverSecurityCategory", false)
} else {
neko.setPreferenceVisibility("serverSecurityCategory", true)
if (newValue == "tls") {
neko.setPreferenceVisibility("serverFlow", false)
neko.setPreferenceVisibility("serverFlowVision", true)
} else if (newValue == "xtls") {
neko.setPreferenceVisibility("serverFlow", true)
neko.setPreferenceVisibility("serverFlowVision", false)
}
let isXTLS = (newValue == "xtls")
neko.setPreferenceVisibility("serverFlow", isXTLS)
neko.setPreferenceVisibility("serverFlowVision", !isXTLS)
neko.setPreferenceVisibility("utlsFingerprint", !isXTLS)
}
}
}
Expand Down Expand Up @@ -653,6 +662,7 @@ class vlessClass {
"serverName": ss.serverSNI,
"allowInsecure": ss.serverAllowInsecure,
}
if (ss.utlsFingerprint.isNotBlank()) t2["fingerprint"] = ss.utlsFingerprint
if (ss.serverALPN.isNotBlank()) t2["alpn"] = ss.serverALPN.lines()
if (ss.serverCertificates.isNotBlank()) t2["certificates"] = { "certificate": ss.serverCertificates.lines() }
t0.outbounds[0].streamSettings["tlsSettings"] = t2
Expand Down

0 comments on commit 7752aea

Please sign in to comment.