mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 06:30:05 +08:00
update v2rayN share link
This commit is contained in:
parent
225b60f8ac
commit
be5962df8b
@ -31,8 +31,11 @@ enum class PluginEntry(
|
||||
TUIC(
|
||||
"tuic-plugin",
|
||||
SagerNet.application.getString(R.string.action_tuic),
|
||||
"io.nekohasekai.sagernet.plugin.tuic",
|
||||
DownloadSource(fdroid = false)
|
||||
"moe.matsuri.exe.tuic", DownloadSource(
|
||||
playStore = false,
|
||||
fdroid = false,
|
||||
downloadLink = "https://github.com/MatsuriDayo/plugins/releases?q=tuic"
|
||||
)
|
||||
),
|
||||
;
|
||||
|
||||
|
||||
@ -158,6 +158,12 @@ fun StandardV2RayBean.parseDuckSoft(url: HttpUrl) {
|
||||
url.queryParameter("cert")?.let {
|
||||
certificates = it
|
||||
}
|
||||
url.queryParameter("pbk")?.let {
|
||||
realityPubKey = it
|
||||
}
|
||||
url.queryParameter("sid")?.let {
|
||||
realityShortId = it
|
||||
}
|
||||
}
|
||||
}
|
||||
when (type) {
|
||||
@ -293,7 +299,7 @@ fun parseV2RayN(link: String): VMessBean {
|
||||
bean.encryption = vmessQRCode.scy
|
||||
bean.uuid = vmessQRCode.id
|
||||
bean.alterId = vmessQRCode.aid.toIntOrNull()
|
||||
bean.type = vmessQRCode.type
|
||||
bean.type = vmessQRCode.net
|
||||
bean.host = vmessQRCode.host
|
||||
bean.path = vmessQRCode.path
|
||||
val headerType = vmessQRCode.type
|
||||
@ -305,10 +311,11 @@ fun parseV2RayN(link: String): VMessBean {
|
||||
}
|
||||
}
|
||||
}
|
||||
when (vmessQRCode.tls) {
|
||||
"tls", "reality" -> bean.security = "tls"
|
||||
}
|
||||
|
||||
bean.name = vmessQRCode.ps
|
||||
bean.security = vmessQRCode.tls
|
||||
if (bean.security == "reality") bean.security = "tls"
|
||||
bean.sni = vmessQRCode.sni
|
||||
bean.alpn = vmessQRCode.alpn.replace(",", "\n")
|
||||
bean.utlsFingerprint = vmessQRCode.fp
|
||||
@ -454,6 +461,11 @@ fun StandardV2RayBean.toUriVMessVLESSTrojan(isTrojan: Boolean): String {
|
||||
if (utlsFingerprint.isNotBlank()) {
|
||||
builder.addQueryParameter("fp", utlsFingerprint)
|
||||
}
|
||||
if (realityPubKey.isNotBlank()) {
|
||||
builder.setQueryParameter("security", "reality")
|
||||
builder.addQueryParameter("pbk", realityPubKey)
|
||||
builder.addQueryParameter("sid", realityShortId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user