feat: 看起来效果不错.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
Reference in New Issue
Block a user