Files
netch/Netch/Interfaces/IServerController.cs
ChsBuffer 635212f24d Replace NTTController with NatTypetester(Stun.Net)
Enable NAT Type Test for all mode types
Remove Shadowsocks SS
2021-09-10 23:56:25 +08:00

28 lines
755 B
C#

using System.Threading.Tasks;
using Netch.Models;
using Netch.Servers;
namespace Netch.Interfaces
{
public interface IServerController : IController
{
public ushort? Socks5LocalPort { get; set; }
public string? LocalAddress { get; set; }
public Task<Socks5LocalServer> StartAsync(Server s);
}
public static class ServerControllerExtension
{
public static ushort Socks5LocalPort(this IServerController controller)
{
return controller.Socks5LocalPort ?? Global.Settings.Socks5LocalPort;
}
public static string LocalAddress(this IServerController controller)
{
return controller.LocalAddress ?? Global.Settings.LocalAddress;
}
}
}