Upload files to "smtpproxy.net"

This commit is contained in:
2026-08-17 10:26:16 +10:00
commit d61c48f4ab
4 changed files with 685 additions and 0 deletions

44
smtpproxy.net/Program.cs Normal file
View File

@@ -0,0 +1,44 @@
using System.Configuration.Install;
using System.Reflection;
using System.ServiceProcess;
namespace smtpproxy.net;
internal static class Program
{
private static void Main(string[] args)
{
SMTPProxy sMTPProxy = new SMTPProxy();
ServiceBase[] services = new ServiceBase[1] { sMTPProxy };
if (args.Length != 0)
{
switch (args[0])
{
case "-install":
ManagedInstallerClass.InstallHelper(new string[1] { Assembly.GetExecutingAssembly().Location });
break;
case "-uninstall":
ManagedInstallerClass.InstallHelper(new string[2]
{
"/u",
Assembly.GetExecutingAssembly().Location
});
break;
case "-console":
if (args.Length > 1 && args[1] == "-reload")
{
sMTPProxy.Reload(args[2]);
}
else
{
sMTPProxy.Start();
}
break;
}
}
else
{
ServiceBase.Run(services);
}
}
}