add email and ip limit to vmess ui

This commit is contained in:
Hossin Asaadi
2022-10-29 11:42:15 -04:00
parent a2db446cf3
commit d864d20f34
2 changed files with 25 additions and 1 deletions

View File

@@ -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,
);
}
};

View File

@@ -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>