fix: parse encryption

This commit is contained in:
arm64v8a 2023-04-06 08:10:38 +09:00
parent e294613361
commit 9601549d83
2 changed files with 9 additions and 1 deletions

View File

@ -186,7 +186,8 @@ public abstract class StandardV2RayBean extends AbstractBean {
public boolean isVLESS() {
if (this instanceof VMessBean) {
return ((VMessBean) this).alterId == -1;
Integer aid = ((VMessBean) this).alterId;
return aid != null && aid == -1;
}
return false;
}

View File

@ -207,6 +207,13 @@ fun StandardV2RayBean.parseDuckSoft(url: HttpUrl) {
}
}
// maybe from matsuri vmess exoprt
if (this is VMessBean && !isVLESS) {
url.queryParameter("encryption")?.let {
encryption = it
}
}
url.queryParameter("packetEncoding")?.let {
when (it) {
"packet" -> packetEncoding = 1