[bug] fix cloned inbound settings

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
MHSanaei 2023-05-13 13:33:13 +03:30
parent 2a182d8b9a
commit 46bc39c160

View file

@ -495,7 +495,6 @@
});
},
async cloneInbound(baseInbound, dbInbound) {
const inbound = new Inbound();
const data = {
up: dbInbound.up,
down: dbInbound.down,
@ -504,10 +503,10 @@
enable: dbInbound.enable,
expiryTime: dbInbound.expiryTime,
listen: inbound.listen,
port: inbound.port,
listen: '',
port: RandomUtil.randomIntRange(10000, 60000),
protocol: baseInbound.protocol,
settings: inbound.settings.toString(),
settings: Inbound.Settings.getSettings(baseInbound.protocol).toString(),
streamSettings: baseInbound.stream.toString(),
sniffing: baseInbound.canSniffing() ? baseInbound.sniffing.toString() : '{}',
};