mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-19 03:25:01 +03:00
Remove streamSettings for protocols that don't support it
- Frontend: Only include streamSettings in toJson() for vmess, vless, trojan, shadowsocks, and hysteria protocols - Frontend: Hide Stream tab in Advanced section for unsupported protocols - Frontend: Clear streamSettings in Advanced tab when switching to unsupported protocols - Frontend: Add CodeMirror JSON editor to config view in index page with mobile responsive design - Backend: Add normalizeStreamSettings() to clear streamSettings for tunnel, mixed, http, tun, and wireguard protocols - Backend: Apply normalization in AddInbound() and UpdateInbound() - Backend: Add omitempty JSON tag to StreamSettings field to exclude null values from Xray config
This commit is contained in:
+2
-2
@@ -13,9 +13,9 @@ type InboundConfig struct {
|
||||
Port int `json:"port"`
|
||||
Protocol string `json:"protocol"`
|
||||
Settings json_util.RawMessage `json:"settings"`
|
||||
StreamSettings json_util.RawMessage `json:"streamSettings"`
|
||||
StreamSettings json_util.RawMessage `json:"streamSettings,omitempty"`
|
||||
Tag string `json:"tag"`
|
||||
Sniffing json_util.RawMessage `json:"sniffing"`
|
||||
Sniffing json_util.RawMessage `json:"sniffing,omitempty"`
|
||||
}
|
||||
|
||||
// Equals compares two InboundConfig instances for deep equality.
|
||||
|
||||
Reference in New Issue
Block a user