mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-19 15:25:49 +00:00
add email and ip limit to vmess ui
This commit is contained in:
@@ -1157,16 +1157,22 @@ Inbound.VmessSettings = class extends Inbound.Settings {
|
||||
}
|
||||
};
|
||||
Inbound.VmessSettings.Vmess = class extends XrayCommonClass {
|
||||
constructor(id=RandomUtil.randomUUID(), alterId=0) {
|
||||
constructor(id=RandomUtil.randomUUID(), alterId=0, email='', limitIp=0) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.alterId = alterId;
|
||||
this.email = email;
|
||||
this.limitIp = limitIp;
|
||||
|
||||
}
|
||||
|
||||
static fromJson(json={}) {
|
||||
return new Inbound.VmessSettings.Vmess(
|
||||
json.id,
|
||||
json.alterId,
|
||||
json.email,
|
||||
json.limitIp,
|
||||
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
{{define "form/vmess"}}
|
||||
<a-form layout="inline">
|
||||
<a-form layout="inline">
|
||||
<a-form-item label="Email">
|
||||
<a-input v-model.trim="inbound.settings.vmesses[0].email"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<span slot="label">
|
||||
Ip Count Limit
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
disable inbound if more than entered count (0 for disable limit ip)
|
||||
</template>
|
||||
<a-icon type="question-circle" theme="filled"></a-icon>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
|
||||
<a-input type="number" v-model.number="inbound.settings.vmesses[0].limitIp"></a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<a-form-item label="id">
|
||||
<a-input v-model.trim="inbound.settings.vmesses[0].id"></a-input>
|
||||
</a-form-item>
|
||||
|
||||
Reference in New Issue
Block a user