MHSanaei 1 年之前
父節點
當前提交
c31882cb92
共有 3 個文件被更改,包括 5 次插入5 次删除
  1. 2 2
      web/controller/inbound.go
  2. 2 2
      web/html/xui/xray_rule_modal.html
  3. 1 1
      web/service/inbound.go

+ 2 - 2
web/controller/inbound.go

@@ -86,7 +86,7 @@ func (a *InboundController) addInbound(c *gin.Context) {
 	user := session.GetLoginUser(c)
 	inbound.UserId = user.Id
 	if inbound.Listen == "" || inbound.Listen == "0.0.0.0" || inbound.Listen == "::" || inbound.Listen == "::0" {
-		inbound.Tag = fmt.Sprintf("inbound-0.0.0.0:%v", inbound.Port)
+		inbound.Tag = fmt.Sprintf("inbound-%v", inbound.Port)
 	} else {
 		inbound.Tag = fmt.Sprintf("inbound-%v:%v", inbound.Listen, inbound.Port)
 	}
@@ -283,7 +283,7 @@ func (a *InboundController) importInbound(c *gin.Context) {
 	inbound.Id = 0
 	inbound.UserId = user.Id
 	if inbound.Listen == "" || inbound.Listen == "0.0.0.0" || inbound.Listen == "::" || inbound.Listen == "::0" {
-		inbound.Tag = fmt.Sprintf("inbound-0.0.0.0:%v", inbound.Port)
+		inbound.Tag = fmt.Sprintf("inbound-%v", inbound.Port)
 	} else {
 		inbound.Tag = fmt.Sprintf("inbound-%v:%v", inbound.Listen, inbound.Port)
 	}

+ 2 - 2
web/html/xui/xray_rule_modal.html

@@ -20,7 +20,7 @@
             <a-input v-model.trim="ruleModal.rule.source"></a-input>
         </a-form-item>
         <a-form-item>
-            <template slot="label">Source Port
+            <template slot="label">
                 <a-tooltip>
                     <template slot="title">
                         <span>{{ i18n "pages.xray.rules.useComma" }}</span>
@@ -174,7 +174,7 @@
                 this.rule.protocol = rule.protocol;
                 this.rule.attrs = rule.attrs ? Object.entries(rule.attrs) : [];
                 this.rule.outboundTag = rule.outboundTag;
-                this.rule.balancerTag = rule.balancerTag ? rule.balancerTag : ""
+                this.rule.balancerTag = rule.balancerTag ? rule.balancerTag : "";
             } else {
                 this.rule = {
                     domainMatcher: "",

+ 1 - 1
web/service/inbound.go

@@ -312,7 +312,7 @@ func (s *InboundService) UpdateInbound(inbound *model.Inbound) (*model.Inbound,
 	oldInbound.StreamSettings = inbound.StreamSettings
 	oldInbound.Sniffing = inbound.Sniffing
 	if inbound.Listen == "" || inbound.Listen == "0.0.0.0" || inbound.Listen == "::" || inbound.Listen == "::0" {
-		oldInbound.Tag = fmt.Sprintf("inbound-0.0.0.0:%v", inbound.Port)
+		oldInbound.Tag = fmt.Sprintf("inbound-%v", inbound.Port)
 	} else {
 		oldInbound.Tag = fmt.Sprintf("inbound-%v:%v", inbound.Listen, inbound.Port)
 	}