Skip to content

Commit

Permalink
Automatically add an akstreamweb ip address as an authorized access i…
Browse files Browse the repository at this point in the history
…p for the mediaserver
  • Loading branch information
chatop2020 committed Nov 15, 2023
1 parent ed2429b commit 8f0588d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions AKStreamKeeper/MediaServerInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,19 @@ public bool SetConfig(out ResponseStruct rs)
_zlmNewConfig.Rtsp.AuthBasic = 1;
}

if (_zlmNewConfig != null && _zlmNewConfig.Http != null &&
!_zlmNewConfig.Http.Allow_Ip_Range.Contains(h) && UtilsHelper.IsIpAddr(h))
{
if (_zlmNewConfig.Http.Allow_Ip_Range.EndsWith(","))
{
_zlmNewConfig.Http.Allow_Ip_Range += h;
}
else
{
_zlmNewConfig.Http.Allow_Ip_Range += "," + h;
}
}

_zlmNewConfig.Hook.On_Shell_Login =
$"http://{h}:{p}/MediaServer/WebHook/OnShellLogin"; //shell鉴权
_zlmNewConfig.Hook.On_Stream_Changed =
Expand Down

0 comments on commit 8f0588d

Please sign in to comment.