diff --git a/AKStreamKeeper/AKStream.ldb b/AKStreamKeeper/AKStream.ldb index 871126b..40b0037 100644 Binary files a/AKStreamKeeper/AKStream.ldb and b/AKStreamKeeper/AKStream.ldb differ diff --git a/AKStreamKeeper/MediaServerInstance.cs b/AKStreamKeeper/MediaServerInstance.cs index 5419b7e..eab74ce 100644 --- a/AKStreamKeeper/MediaServerInstance.cs +++ b/AKStreamKeeper/MediaServerInstance.cs @@ -848,8 +848,8 @@ public bool SetConfig(out ResponseStruct rs) Uri AKStreamWebUri = new Uri(Common.AkStreamKeeperConfig.AkStreamWebRegisterUrl); string h = AKStreamWebUri.Host.Trim(); string p = AKStreamWebUri.Port.ToString(); - string h2 = _akStreamKeeperConfig.IpV4Address; - string h3 = _akStreamKeeperConfig.Candidate; + // string h2 = _akStreamKeeperConfig.IpV4Address; + // string h3 = _akStreamKeeperConfig.Candidate; if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists("/etc/hostname")) { @@ -933,7 +933,7 @@ public bool SetConfig(out ResponseStruct rs) _zlmNewConfig.Rtsp.AuthBasic = 1; } - if (_zlmNewConfig != null && _zlmNewConfig.Http != null && + /*if (_zlmNewConfig != null && _zlmNewConfig.Http != null && !_zlmNewConfig.Http.Allow_Ip_Range.Contains(h) && UtilsHelper.IsIpAddr(h)) { if (_zlmNewConfig.Http.Allow_Ip_Range.EndsWith(",")) @@ -945,7 +945,7 @@ public bool SetConfig(out ResponseStruct rs) _zlmNewConfig.Http.Allow_Ip_Range += "," + h; } } - + if (_zlmNewConfig != null && _zlmNewConfig.Http != null && !_zlmNewConfig.Http.Allow_Ip_Range.Contains(h2) && UtilsHelper.IsIpAddr(h2)) { @@ -958,7 +958,7 @@ public bool SetConfig(out ResponseStruct rs) _zlmNewConfig.Http.Allow_Ip_Range += "," + h2; } } - + if (_zlmNewConfig != null && _zlmNewConfig.Http != null && !_zlmNewConfig.Http.Allow_Ip_Range.Contains(h3) && UtilsHelper.IsIpAddr(h3)) { @@ -970,9 +970,12 @@ public bool SetConfig(out ResponseStruct rs) { _zlmNewConfig.Http.Allow_Ip_Range += "," + h3; } + }*/ + if (_zlmNewConfig != null && _zlmNewConfig.Http != null) + { + _zlmNewConfig.Http.Allow_Ip_Range = ""; //把ip白名单去掉 } - _zlmNewConfig.Hook.On_Shell_Login = $"http://{h}:{p}/MediaServer/WebHook/OnShellLogin"; //shell鉴权 _zlmNewConfig.Hook.On_Stream_Changed = diff --git a/LibCommon/Structs/ZLMediaKitConfig/ZLMediaKitConfigNew.cs b/LibCommon/Structs/ZLMediaKitConfig/ZLMediaKitConfigNew.cs index c4f4f84..749f792 100644 --- a/LibCommon/Structs/ZLMediaKitConfig/ZLMediaKitConfigNew.cs +++ b/LibCommon/Structs/ZLMediaKitConfig/ZLMediaKitConfigNew.cs @@ -620,10 +620,7 @@ public bool SetConfig(string configPath) data["http"]["allow_cross_domains"] = Http.Allow_Cross_Domains.Trim(); } - if (!string.IsNullOrEmpty(Http.Allow_Ip_Range)) - { - data["http"]["allow_ip_range"] = Http.Allow_Ip_Range.Trim(); - } + data["http"]["allow_ip_range"] = Http.Allow_Ip_Range.Trim()+" "; } #endregion