mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-18 14:55:49 +00:00
Clone Bug Fix
Bug fix, set duplicate publicKey, privateKey, shortIds in cloned inbound from reality inbounds
This commit is contained in:
@@ -616,9 +616,17 @@
|
||||
port: RandomUtil.randomIntRange(10000, 60000),
|
||||
protocol: baseInbound.protocol,
|
||||
settings: Inbound.Settings.getSettings(baseInbound.protocol).toString(),
|
||||
streamSettings: baseInbound.stream.toString(),
|
||||
sniffing: baseInbound.canSniffing() ? baseInbound.sniffing.toString() : '{}',
|
||||
};
|
||||
if(baseInbound.stream.isReality) {
|
||||
const getNewX25519 = await HttpUtil.post('/server/getNewX25519Cert');
|
||||
baseInbound.stream.reality.shortIds = RandomUtil.randomShortId();
|
||||
baseInbound.stream.reality.privateKey = getNewX25519.obj.privateKey
|
||||
baseInbound.stream.reality.settings.publicKey = getNewX25519.obj.publicKey;
|
||||
data.streamSettings = baseInbound.stream.toString();
|
||||
} else {
|
||||
data.streamSettings = baseInbound.stream.toString();
|
||||
}
|
||||
await this.submit('/xui/inbound/add', data, inModal);
|
||||
},
|
||||
async addInbound(inbound, dbInbound) {
|
||||
@@ -989,4 +997,4 @@
|
||||
{{template "clientsModal"}}
|
||||
{{template "clientsBulkModal"}}
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user