support old shadowsocks methods

This commit is contained in:
Alireza Ahmadi
2023-07-13 20:41:04 +02:00
parent 678ec4fdfc
commit bd8028fae5
6 changed files with 51 additions and 16 deletions

View File

@@ -100,6 +100,17 @@
this.inModal.inbound.reality = false;
}
},
SSMethodChange() {
if (this.inModal.inbound.isSSMultiUser) {
if (this.inModal.inbound.settings.shadowsockses.length ==0){
this.inModal.inbound.settings.shadowsockses = [new Inbound.ShadowsocksSettings.Shadowsocks()];
}
} else {
if (this.inModal.inbound.settings.shadowsockses.length > 0){
this.inModal.inbound.settings.shadowsockses = [];
}
}
},
setDefaultCertData(index){
inModal.inbound.stream.tls.certs[index].certFile = app.defaultCert;
inModal.inbound.stream.tls.certs[index].keyFile = app.defaultKey;