diff --git a/Netch/Servers/Shadowsocks/SSController.cs b/Netch/Servers/Shadowsocks/SSController.cs index c6e09d98..c4627b38 100644 --- a/Netch/Servers/Shadowsocks/SSController.cs +++ b/Netch/Servers/Shadowsocks/SSController.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Net; using Netch.Controllers; using Netch.Interfaces; using Netch.Models; @@ -39,7 +40,7 @@ namespace Netch.Servers.Shadowsocks }; StartGuard(command.ToString()); - return new Socks5(this.LocalAddress(), this.Socks5LocalPort()); + return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort()); } [Verb] diff --git a/Netch/Servers/ShadowsocksR/SSRController.cs b/Netch/Servers/ShadowsocksR/SSRController.cs index 934e4ba9..8762ed1b 100644 --- a/Netch/Servers/ShadowsocksR/SSRController.cs +++ b/Netch/Servers/ShadowsocksR/SSRController.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Net; using Netch.Controllers; using Netch.Interfaces; using Netch.Models; @@ -42,7 +43,7 @@ namespace Netch.Servers.ShadowsocksR }; StartGuard(command.ToString()); - return new Socks5(this.LocalAddress(), this.Socks5LocalPort()); + return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort()); } [Verb] diff --git a/Netch/Servers/Trojan/TrojanController.cs b/Netch/Servers/Trojan/TrojanController.cs index 57eea44f..b2783cc6 100644 --- a/Netch/Servers/Trojan/TrojanController.cs +++ b/Netch/Servers/Trojan/TrojanController.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Net; using System.Text.Json; using Netch.Controllers; using Netch.Interfaces; @@ -48,7 +49,7 @@ namespace Netch.Servers File.WriteAllBytes(Constants.TempConfig, JsonSerializer.SerializeToUtf8Bytes(trojanConfig, Global.NewDefaultJsonSerializerOptions)); StartGuard("-c ..\\data\\last.json"); - return new Socks5(this.LocalAddress(), this.Socks5LocalPort()); + return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort()); } } } \ No newline at end of file diff --git a/Netch/Servers/V2ray/V2rayController.cs b/Netch/Servers/V2ray/V2rayController.cs index c18d1ea5..042abdc8 100644 --- a/Netch/Servers/V2ray/V2rayController.cs +++ b/Netch/Servers/V2ray/V2rayController.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Net; using Netch.Controllers; using Netch.Interfaces; using Netch.Models; @@ -29,7 +30,7 @@ namespace Netch.Servers { File.WriteAllText(Constants.TempConfig, V2rayConfigUtils.GenerateClientConfig(s)); StartGuard("-config ..\\data\\last.json"); - return new Socks5(this.LocalAddress(), this.Socks5LocalPort()); + return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort()); } } } \ No newline at end of file