Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com>2023-05-30 23:51:14 +0300
committerHamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com>2023-05-30 23:51:14 +0300
commit8170b65db4d38002f81825ea876dd3e4c9292931 (patch)
tree06e20a3835bf953f17cc50aafd48d367574e5357 /web/service
parenta2d8c98b0df39216787d2c77af6e499857510e9e (diff)
add an option for webDomain
Diffstat (limited to 'web/service')
-rw-r--r--web/service/inbound.go1
-rw-r--r--web/service/setting.go7
2 files changed, 7 insertions, 1 deletions
diff --git a/web/service/inbound.go b/web/service/inbound.go
index 6a182fcf..11522ad2 100644
--- a/web/service/inbound.go
+++ b/web/service/inbound.go
@@ -1185,6 +1185,7 @@ func (s *InboundService) GetInboundClientIps(clientEmail string) (string, error)
}
return InboundClientIps.Ips, nil
}
+
func (s *InboundService) ClearClientIps(clientEmail string) error {
db := database.GetDB()
diff --git a/web/service/setting.go b/web/service/setting.go
index 593b23be..677ccbb2 100644
--- a/web/service/setting.go
+++ b/web/service/setting.go
@@ -24,6 +24,7 @@ var xrayTemplateConfig string
var defaultValueMap = map[string]string{
"xrayTemplateConfig": xrayTemplateConfig,
"webListen": "",
+ "webDomain": "",
"webPort": "2053",
"webCertFile": "",
"webKeyFile": "",
@@ -44,7 +45,7 @@ var defaultValueMap = map[string]string{
"subEnable": "false",
"subListen": "",
"subPort": "2096",
- "subPath": "sub/",
+ "subPath": "/sub/",
"subDomain": "",
"subCertFile": "",
"subKeyFile": "",
@@ -225,6 +226,10 @@ func (s *SettingService) GetListen() (string, error) {
return s.getString("webListen")
}
+func (s *SettingService) GetWebDomain() (string, error) {
+ return s.getString("webDomain")
+}
+
func (s *SettingService) GetTgBotToken() (string, error) {
return s.getString("tgBotToken")
}