Remove IServerController.Server

This commit is contained in:
ChsBuffer
2020-12-15 19:51:27 +08:00
parent 39eb1b4eef
commit a5903f5f57
11 changed files with 7 additions and 23 deletions

View File

@@ -188,7 +188,7 @@ namespace Netch.Controllers
var offset = portType == PortType.UDP ? UdpNameListOffset : 0;
if (controller.Server is Socks5 socks5)
if (MainController.Server is Socks5 socks5)
{
aio_dial((int) NameList.TYPE_TCPTYPE + offset, "Socks5");
aio_dial((int) NameList.TYPE_TCPHOST + offset, $"{socks5.AutoResolveHostname()}:{socks5.Port}");
@@ -196,7 +196,7 @@ namespace Netch.Controllers
aio_dial((int) NameList.TYPE_TCPPASS + offset, socks5.Password ?? string.Empty);
aio_dial((int) NameList.TYPE_TCPMETH + offset, string.Empty);
}
else if (controller.Server is Shadowsocks shadowsocks)
else if (MainController.Server is Shadowsocks shadowsocks)
{
aio_dial((int) NameList.TYPE_TCPTYPE + offset, "Shadowsocks");
aio_dial((int) NameList.TYPE_TCPHOST + offset, $"{shadowsocks.AutoResolveHostname()}:{shadowsocks.Port}");