feat: 看起来效果不错.

This commit is contained in:
2025-01-11 02:35:39 +08:00
parent 66a0a2de08
commit 9ed913b15d
6 changed files with 372 additions and 87 deletions
@@ -12,7 +12,6 @@ public class ShadowSocksOutboundSetting : BaseOutboundSetting
public string? UserEmail { get; init; } = null;
public required string Method { get; init; }
public new required string Address { get; init; }
public int Port { get; init; }
public required string Password { get; init; }
public bool EnableUdpOverTcp { get; init; } = false;
+18
View File
@@ -16,6 +16,23 @@ public class InboundConfig
{
public HttpInboundSetting? Http { get; init; }
public SocksInboundSetting? Socks { get; init; }
public List<IInboundSetting> ToInboundSettings()
{
var inboundSettings = new List<IInboundSetting>();
if (Http != null)
{
inboundSettings.Add(Http);
}
if (Socks != null)
{
inboundSettings.Add(Socks);
}
return inboundSettings;
}
}
public interface IInboundSetting
@@ -142,4 +159,5 @@ public class BasicInboundAuthSetting(string username, string password)
public class SubscribeSetting
{
public List<SubscribeSource> Subscribes { get; } = [];
public string SubscribeSaveFile { get; } = "./subscribes.json";
}