Add possibility to remove client email from sub (#4297)

This commit is contained in:
Vladislav Kasperov authored and GitHub committed 2026-05-13 19:04:17 +02:00 Unverified
1 parent 5543466fcc
commit 67b098dfd3
18 files changed
+49 -1

No files matched your search

+1
View File
@@ -57,6 +57,7 @@ export class AllSetting {
this.subUpdates = 12;
this.subEncrypt = true;
this.subShowInfo = true;
this.subEmailInRemark = true;
this.subURI = "";
this.subJsonURI = "";
this.subClashURI = "";
@@ -112,6 +112,14 @@ function normalizeSubPath() {
</template>
</SettingListItem>
<SettingListItem paddings="small">
<template #title>{{ t('pages.settings.subEmailInRemark') }}</template>
<template #description>{{ t('pages.settings.subEmailInRemarkDesc') }}</template>
<template #control>
<a-switch v-model:checked="allSetting.subEmailInRemark" />
</template>
</SettingListItem>
<a-divider>{{ t('pages.settings.subTitle') }}</a-divider>
<SettingListItem paddings="small">
+8 -1
View File
@@ -28,6 +28,7 @@ type SubService struct {
showInfo bool
remarkModel string
datepicker string
emailInRemark bool
inboundService service.InboundService
settingService service.SettingService
// nodesByID is populated per request from the Node table so
@@ -76,6 +77,12 @@ func (s *SubService) GetSubs(subId string, host string) ([]string, int64, xray.C
if err != nil {
s.datepicker = "gregorian"
}
s.emailInRemark, err = s.settingService.GetSubEmailInRemark()
if err != nil {
s.emailInRemark = true
}
seenEmails := make(map[string]struct{})
for _, inbound := range inbounds {
clients, err := s.inboundService.GetClients(inbound)
@@ -886,7 +893,7 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin
'e': "",
'o': "",
}
if len(email) > 0 {
if len(email) > 0 && s.emailInRemark {
orders['e'] = email
}
if len(inbound.Remark) > 0 {
Loaded 3 of 18 files, more files were not shown because too many files have changed in this diff. Show more