Files
netch/Netch/Servers/ShadowsocksR/ShadowsocksRForm.cs
2021-08-31 11:48:49 +08:00

22 lines
1.1 KiB
C#

using Netch.Forms;
using Netch.Utils;
namespace Netch.Servers
{
public class ShadowsocksRForm : ServerForm
{
public ShadowsocksRForm(ShadowsocksRServer? server = default)
{
server ??= new ShadowsocksRServer();
Server = server;
CreateTextBox("Password", "Password", s => !s.IsNullOrWhiteSpace(), s => server.Password = s, server.Password);
CreateComboBox("EncryptMethod", "Encrypt Method", SSRGlobal.EncryptMethods, s => server.EncryptMethod = s, server.EncryptMethod);
CreateComboBox("Protocol", "Protocol", SSRGlobal.Protocols, s => server.Protocol = s, server.Protocol);
CreateTextBox("ProtocolParam", "Protocol Param", s => true, s => server.ProtocolParam = s, server.ProtocolParam);
CreateComboBox("OBFS", "OBFS", SSRGlobal.OBFSs, s => server.OBFS = s, server.OBFS);
CreateTextBox("OBFSParam", "OBFS Param", s => true, s => server.OBFSParam = s, server.OBFSParam);
}
protected override string TypeName { get; } = "ShadowsocksR";
}
}