mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-16 04:25:46 +00:00
Compare commits
1 commit
a70fa84d95
...
0414ef17b0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0414ef17b0 |
1 changed files with 3 additions and 33 deletions
|
|
@ -1098,10 +1098,7 @@
|
||||||
}
|
}
|
||||||
data.sniffing = inbound.sniffing.toString();
|
data.sniffing = inbound.sniffing.toString();
|
||||||
|
|
||||||
const formData = new FormData();
|
await this.submit(`/panel/api/inbounds/update/${dbInbound.id}`, data, inModal);
|
||||||
Object.keys(data).forEach(key => formData.append(key, data[key]));
|
|
||||||
|
|
||||||
await this.submit(`/panel/api/inbounds/update/${dbInbound.id}`, formData, inModal);
|
|
||||||
},
|
},
|
||||||
openAddClient(dbInboundId) {
|
openAddClient(dbInboundId) {
|
||||||
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
|
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
|
||||||
|
|
@ -1291,36 +1288,9 @@
|
||||||
infoModal.show(newDbInbound, index);
|
infoModal.show(newDbInbound, index);
|
||||||
},
|
},
|
||||||
switchEnable(dbInboundId, state) {
|
switchEnable(dbInboundId, state) {
|
||||||
let dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
|
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
|
||||||
if (!dbInbound) return;
|
|
||||||
dbInbound.enable = state;
|
dbInbound.enable = state;
|
||||||
let inbound = dbInbound.toInbound();
|
this.submit(`/panel/api/inbounds/update/${dbInboundId}`, dbInbound);
|
||||||
const data = {
|
|
||||||
up: dbInbound.up,
|
|
||||||
down: dbInbound.down,
|
|
||||||
total: dbInbound.total,
|
|
||||||
remark: dbInbound.remark,
|
|
||||||
enable: dbInbound.enable,
|
|
||||||
expiryTime: dbInbound.expiryTime,
|
|
||||||
trafficReset: dbInbound.trafficReset,
|
|
||||||
lastTrafficResetTime: dbInbound.lastTrafficResetTime,
|
|
||||||
|
|
||||||
listen: inbound.listen,
|
|
||||||
port: inbound.port,
|
|
||||||
protocol: inbound.protocol,
|
|
||||||
settings: inbound.settings.toString(),
|
|
||||||
};
|
|
||||||
if (inbound.canEnableStream()) {
|
|
||||||
data.streamSettings = inbound.stream.toString();
|
|
||||||
} else if (inbound.stream?.sockopt) {
|
|
||||||
data.streamSettings = JSON.stringify({ sockopt: inbound.stream.sockopt.toJson() }, null, 2);
|
|
||||||
}
|
|
||||||
data.sniffing = inbound.sniffing.toString();
|
|
||||||
|
|
||||||
const formData = new FormData();
|
|
||||||
Object.keys(data).forEach(key => formData.append(key, data[key]));
|
|
||||||
|
|
||||||
this.submit(`/panel/api/inbounds/update/${dbInboundId}`, formData);
|
|
||||||
},
|
},
|
||||||
async switchEnableClient(dbInboundId, client) {
|
async switchEnableClient(dbInboundId, client) {
|
||||||
this.loading()
|
this.loading()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue