refactor: 优化配置代码结构.

This commit is contained in:
2025-01-09 01:33:38 +08:00
parent 99cb0a03a5
commit db43e05770
8 changed files with 216 additions and 17 deletions
@@ -0,0 +1,34 @@
using System.Text.Json.Nodes;
namespace Proxd_man.Config.Outbound;
public class BlackholeOutboundSetting : BaseOutboundSetting
{
private readonly string _tag;
public BlackholeOutboundSetting(string tag = "block")
{
Protocol = OutboundProtocolType.Blackhole;
this._tag = tag;
}
public override JsonObject ToJsonSetting()
{
return new JsonObject
{
{ "protocol", "freedom" },
{ "tag", _tag }
};
}
public override string GetTag()
{
return _tag;
}
protected override JsonObject GetProtocolSetting()
{
throw new NotImplementedException();
}
}