From a4a221ef2f85457d82d72455f9cbd997bea1eddf Mon Sep 17 00:00:00 2001 From: Connection Refused Date: Mon, 18 Oct 2021 19:03:27 +0800 Subject: [PATCH] [Netch] Compatible with the latest ss-rust --- Netch/Servers/Shadowsocks/ShadowsocksController.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Netch/Servers/Shadowsocks/ShadowsocksController.cs b/Netch/Servers/Shadowsocks/ShadowsocksController.cs index 6c4f1709..f09c1ddd 100644 --- a/Netch/Servers/Shadowsocks/ShadowsocksController.cs +++ b/Netch/Servers/Shadowsocks/ShadowsocksController.cs @@ -15,7 +15,7 @@ namespace Netch.Servers protected override IEnumerable StartedKeywords => new[] { "listening at" }; - protected override IEnumerable FailedKeywords => new[] { "Invalid config path", "usage", "plugin service exit unexpectedly" }; + protected override IEnumerable FailedKeywords => new[] { "error", "failed to start plguin" }; public override string Name => "Shadowsocks"; @@ -29,13 +29,10 @@ namespace Netch.Servers var arguments = new object?[] { - "-s", await server.AutoResolveHostnameAsync(), - "-p", server.Port, - "-b", this.LocalAddress(), - "-l", this.Socks5LocalPort(), + "-s", $"{await server.AutoResolveHostnameAsync()}:{server.Port}", + "-b", $"{this.LocalAddress()}:{this.Socks5LocalPort()}", "-m", server.EncryptMethod, "-k", server.Password, - "-u", SpecialArgument.Flag, "--plugin", server.Plugin, "--plugin-opts", server.PluginOption };