|
@@ -830,7 +830,7 @@
|
|
|
},
|
|
|
async getDBInbounds() {
|
|
|
this.refreshing = true;
|
|
|
- const msg = await HttpUtil.post('/panel/inbound/list');
|
|
|
+ const msg = await HttpUtil.get('/panel/api/inbounds/list');
|
|
|
if (!msg.success) {
|
|
|
this.refreshing = false;
|
|
|
return;
|
|
@@ -845,7 +845,7 @@
|
|
|
}, 500);
|
|
|
},
|
|
|
async getOnlineUsers() {
|
|
|
- const msg = await HttpUtil.post('/panel/inbound/onlines');
|
|
|
+ const msg = await HttpUtil.post('/panel/api/inbounds/onlines');
|
|
|
if (!msg.success) {
|
|
|
return;
|
|
|
}
|
|
@@ -1099,7 +1099,7 @@
|
|
|
streamSettings: baseInbound.stream.toString(),
|
|
|
sniffing: baseInbound.sniffing.toString(),
|
|
|
};
|
|
|
- await this.submit('/panel/inbound/add', data, inModal);
|
|
|
+ await this.submit('/panel/api/inbounds/add', data, inModal);
|
|
|
},
|
|
|
openAddInbound() {
|
|
|
inModal.show({
|
|
@@ -1148,7 +1148,7 @@
|
|
|
}
|
|
|
data.sniffing = inbound.sniffing.toString();
|
|
|
|
|
|
- await this.submit('/panel/inbound/add', data, inModal);
|
|
|
+ await this.submit('/panel/api/inbounds/add', data, inModal);
|
|
|
},
|
|
|
async updateInbound(inbound, dbInbound) {
|
|
|
const data = {
|
|
@@ -1171,7 +1171,7 @@
|
|
|
}
|
|
|
data.sniffing = inbound.sniffing.toString();
|
|
|
|
|
|
- await this.submit(`/panel/inbound/update/${dbInbound.id}`, data, inModal);
|
|
|
+ await this.submit(`/panel/api/inbounds/update/${dbInbound.id}`, data, inModal);
|
|
|
},
|
|
|
openAddClient(dbInboundId) {
|
|
|
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
|
|
@@ -1226,14 +1226,14 @@
|
|
|
id: dbInboundId,
|
|
|
settings: '{"clients": [' + clients.toString() + ']}',
|
|
|
};
|
|
|
- await this.submit(`/panel/inbound/addClient`, data, modal);
|
|
|
+ await this.submit(`/panel/api/inbounds/addClient`, data, modal);
|
|
|
},
|
|
|
async updateClient(client, dbInboundId, clientId) {
|
|
|
const data = {
|
|
|
id: dbInboundId,
|
|
|
settings: '{"clients": [' + client.toString() + ']}',
|
|
|
};
|
|
|
- await this.submit(`/panel/inbound/updateClient/${clientId}`, data, clientModal);
|
|
|
+ await this.submit(`/panel/api/inbounds/updateClient/${clientId}`, data, clientModal);
|
|
|
},
|
|
|
resetTraffic(dbInboundId) {
|
|
|
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
|
|
@@ -1258,7 +1258,7 @@
|
|
|
class: themeSwitcher.currentTheme,
|
|
|
okText: '{{ i18n "delete"}}',
|
|
|
cancelText: '{{ i18n "cancel"}}',
|
|
|
- onOk: () => this.submit('/panel/inbound/del/' + dbInboundId),
|
|
|
+ onOk: () => this.submit('/panel/api/inbounds/del/' + dbInboundId),
|
|
|
});
|
|
|
},
|
|
|
delClient(dbInboundId, client,confirmation = true) {
|
|
@@ -1271,10 +1271,10 @@
|
|
|
class: themeSwitcher.currentTheme,
|
|
|
okText: '{{ i18n "delete"}}',
|
|
|
cancelText: '{{ i18n "cancel"}}',
|
|
|
- onOk: () => this.submit(`/panel/inbound/${dbInboundId}/delClient/${clientId}`),
|
|
|
+ onOk: () => this.submit(`/panel/api/inbounds/${dbInboundId}/delClient/${clientId}`),
|
|
|
});
|
|
|
} else {
|
|
|
- this.submit(`/panel/inbound/${dbInboundId}/delClient/${clientId}`);
|
|
|
+ this.submit(`/panel/api/inbounds/${dbInboundId}/delClient/${clientId}`);
|
|
|
}
|
|
|
},
|
|
|
getSubGroupClients(dbInbounds, currentClient) {
|
|
@@ -1353,7 +1353,7 @@
|
|
|
switchEnable(dbInboundId,state) {
|
|
|
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
|
|
|
dbInbound.enable = state;
|
|
|
- this.submit(`/panel/inbound/update/${dbInboundId}`, dbInbound);
|
|
|
+ this.submit(`/panel/api/inbounds/update/${dbInboundId}`, dbInbound);
|
|
|
},
|
|
|
async switchEnableClient(dbInboundId, client) {
|
|
|
this.loading()
|
|
@@ -1383,10 +1383,10 @@
|
|
|
class: themeSwitcher.currentTheme,
|
|
|
okText: '{{ i18n "reset"}}',
|
|
|
cancelText: '{{ i18n "cancel"}}',
|
|
|
- onOk: () => this.submit('/panel/inbound/' + dbInboundId + '/resetClientTraffic/' + client.email),
|
|
|
+ onOk: () => this.submit('/panel/api/inbounds/' + dbInboundId + '/resetClientTraffic/' + client.email),
|
|
|
})
|
|
|
} else {
|
|
|
- this.submit('/panel/inbound/' + dbInboundId + '/resetClientTraffic/' + client.email);
|
|
|
+ this.submit('/panel/api/inbounds/' + dbInboundId + '/resetClientTraffic/' + client.email);
|
|
|
}
|
|
|
},
|
|
|
resetAllTraffic() {
|
|
@@ -1396,7 +1396,7 @@
|
|
|
class: themeSwitcher.currentTheme,
|
|
|
okText: '{{ i18n "reset"}}',
|
|
|
cancelText: '{{ i18n "cancel"}}',
|
|
|
- onOk: () => this.submit('/panel/inbound/resetAllTraffics'),
|
|
|
+ onOk: () => this.submit('/panel/api/inbounds/resetAllTraffics'),
|
|
|
});
|
|
|
},
|
|
|
resetAllClientTraffics(dbInboundId) {
|
|
@@ -1406,7 +1406,7 @@
|
|
|
class: themeSwitcher.currentTheme,
|
|
|
okText: '{{ i18n "reset"}}',
|
|
|
cancelText: '{{ i18n "cancel"}}',
|
|
|
- onOk: () => this.submit('/panel/inbound/resetAllClientTraffics/' + dbInboundId),
|
|
|
+ onOk: () => this.submit('/panel/api/inbounds/resetAllClientTraffics/' + dbInboundId),
|
|
|
})
|
|
|
},
|
|
|
delDepletedClients(dbInboundId) {
|
|
@@ -1416,7 +1416,7 @@
|
|
|
class: themeSwitcher.currentTheme,
|
|
|
okText: '{{ i18n "delete"}}',
|
|
|
cancelText: '{{ i18n "cancel"}}',
|
|
|
- onOk: () => this.submit('/panel/inbound/delDepletedClients/' + dbInboundId),
|
|
|
+ onOk: () => this.submit('/panel/api/inbounds/delDepletedClients/' + dbInboundId),
|
|
|
})
|
|
|
},
|
|
|
isExpiry(dbInbound, index) {
|
|
@@ -1542,7 +1542,7 @@
|
|
|
value: '',
|
|
|
okText: '{{ i18n "pages.inbounds.import" }}',
|
|
|
confirm: async (dbInboundText) => {
|
|
|
- await this.submit('/panel/inbound/import', {data: dbInboundText}, promptModal);
|
|
|
+ await this.submit('/panel/api/inbounds/import', {data: dbInboundText}, promptModal);
|
|
|
},
|
|
|
});
|
|
|
},
|