给桌面共享增加代理功能

This commit is contained in:
snltty
2024-04-13 17:06:26 +08:00
parent 6ddcfcfb23
commit 0f9c06e524
77 changed files with 3337 additions and 1671 deletions

View File

@@ -38,7 +38,11 @@ namespace cmonitor.api
Type voidType = typeof(void);
IEnumerable<Type> types = assemblys.SelectMany(c => c.GetTypes()).Where(c => c.GetInterfaces().Contains(typeof(IApiController)));
if (config.Data.Common.PluginNames.Length > 0)
{
types = types.Where(c => config.Data.Common.PluginNames.Any(d => c.FullName.Contains(d)));
}
foreach (Type item in types)
{
object obj = serviceProvider.GetService(item);
@@ -76,7 +80,7 @@ namespace cmonitor.api
server = new WebSocketServer();
try
{
server.Start(System.Net.IPAddress.Any, config.Server.ApiPort);
server.Start(System.Net.IPAddress.Any, config.Data.Server.ApiPort);
}
catch (Exception ex)
{