diff --git a/frontend/src/models/inbound.js b/frontend/src/models/inbound.js index cccd8d4d..f8f1738e 100644 --- a/frontend/src/models/inbound.js +++ b/frontend/src/models/inbound.js @@ -687,8 +687,9 @@ export class HysteriaMasquerade extends XrayCommonClass { } static fromJson(json = {}) { + const type = ['proxy', 'file', 'string'].includes(json.type) ? json.type : 'proxy'; return new HysteriaMasquerade( - json.type, + type, json.dir, json.url, json.rewriteHost, diff --git a/frontend/src/pages/inbounds/InboundFormModal.vue b/frontend/src/pages/inbounds/InboundFormModal.vue index fd045bbb..7eebd594 100644 --- a/frontend/src/pages/inbounds/InboundFormModal.vue +++ b/frontend/src/pages/inbounds/InboundFormModal.vue @@ -1671,6 +1671,74 @@ watch( + + + + diff --git a/sub/subJsonService.go b/sub/subJsonService.go index fc35698e..4fe77b88 100644 --- a/sub/subJsonService.go +++ b/sub/subJsonService.go @@ -447,6 +447,9 @@ func (s *SubJsonService) genHy(inbound *model.Inbound, newStream map[string]any, if udpIdleTimeout, ok := hyStream["udpIdleTimeout"].(float64); ok { outHyStream["udpIdleTimeout"] = int(udpIdleTimeout) } + if masquerade, ok := hyStream["masquerade"].(map[string]any); ok { + outHyStream["masquerade"] = masquerade + } newStream["hysteriaSettings"] = outHyStream if finalmask, ok := hyStream["finalmask"].(map[string]any); ok {