Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
add email and ip limit to vmess ui
Browse files Browse the repository at this point in the history
  • Loading branch information
hossinasaadi committed Oct 29, 2022
1 parent a2db446 commit d864d20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

);
}
};
Expand Down
18 changes: 18 additions & 0 deletions web/html/xui/form/protocol/vmess.html
Original file line number Diff line number Diff line change
@@ -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>
Expand Down

0 comments on commit d864d20

Please sign in to comment.