refactor: 优化配置代码结构.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user