IPTables.Net icon indicating copy to clipboard operation
IPTables.Net copied to clipboard

Using ssh factory throws a NotImplementedException

Open grimurd opened this issue 1 year ago • 1 comments

Attempting to use the library with ssfactory from SystemInteract.Remote.

Everything I attempt to do throws a NotImplementedException.

Example

var factory = new SshFactory(host, username, password);

system = new IpTablesSystem(factory, new IPTablesBinaryAdapter());

system.GetChain("filter", "FORWARD", 4);

Results in NotImplementedException: The method or operation is not implemented. SystemInteract.Remote.Remote.SshProcess.get_StartInfo() SystemInteract.ProcessHelper.ReadToEnd(ISystemProcess process, Action<string> output, Action<string> error, int timeout) SystemInteract.ProcessHelper.ReadToEnd(ISystemProcess process, out string output, out string error, int timeout) IPTables.Net.Iptables.Adapter.Client.IPTablesBinaryAdapterClient.ListRules(string table) IPTables.Net.IpTablesSystem.GetRules(IIPTablesAdapterClient client, string table) IPTables.Net.IpTablesSystem.GetChain(IIPTablesAdapterClient client, string table, string chain) IPTables.Net.IpTablesSystem.GetChain(string table, string chain, int ipVersion)

Is there any way for this to work or is this still unfinished?

grimurd avatar Jan 22 '24 10:01 grimurd

Looks your issue is here: https://github.com/splitice/SystemInteract.Net/blob/237f6f4963208de2cfa4a7e3c113017eb73a2e2c/SystemInteract/ProcessHelper.cs#L34C25-L34C34

That requires an unimplemented method.

SystemInteract.Remote is undertested, feel free to design a CI flow for it.

splitice avatar Jan 22 '24 10:01 splitice