[Netch] Compatible with the latest ss-rust

This commit is contained in:
Connection Refused
2021-10-18 19:03:27 +08:00
parent 1dbda9cbf9
commit a4a221ef2f

View File

@@ -15,7 +15,7 @@ namespace Netch.Servers
protected override IEnumerable<string> StartedKeywords => new[] { "listening at" };
protected override IEnumerable<string> FailedKeywords => new[] { "Invalid config path", "usage", "plugin service exit unexpectedly" };
protected override IEnumerable<string> 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
};