expand multiDomain to externalProxy #637

- Including non-tls inbounds
- Support forcedTLS/none/same security
- Change port is possible
- Move it to standard streamSettings
- Optimizing database
This commit is contained in:
Alireza Ahmadi
2023-11-29 03:01:59 +01:00
parent 3eae6300e7
commit 5546883799
15 changed files with 198 additions and 234 deletions

View File

@@ -36,7 +36,7 @@
this.isEdit = isEdit;
this.dbInbound = new DBInbound(dbInbound);
this.inbound = dbInbound.toInbound();
this.clients = this.getClients(this.inbound.protocol, this.inbound.settings);
this.clients = this.inbound.clients;
this.index = index === null ? this.clients.length : index;
this.delayedStart = false;
if (isEdit){
@@ -50,15 +50,6 @@
this.clientStats = this.dbInbound.clientStats.find(row => row.email === this.clients[this.index].email);
this.confirm = confirm;
},
getClients(protocol, clientSettings) {
switch(protocol){
case Protocols.VMESS: return clientSettings.vmesses;
case Protocols.VLESS: return clientSettings.vlesses;
case Protocols.TROJAN: return clientSettings.trojans;
case Protocols.SHADOWSOCKS: return clientSettings.shadowsockses;
default: return null;
}
},
getClientId(protocol, client) {
switch(protocol){
case Protocols.TROJAN: return client.password;