danikf / tik4net

Manage mikrotik routers with .NET C# code via ADO.NET like API or enjoy O/R mapper like highlevel api.
Apache License 2.0
174 stars 93 forks source link

Support RoMON connections #42

Closed dansiegel closed 5 years ago

dansiegel commented 6 years ago

I'd like to have support for connecting to a Mikrotik device via RoMON to allow running API calls over a normally unroutable network. This would allow developers to develop a single controlling application rather than running multiple instances within routable network segments.

danikf commented 6 years ago

Hi, It would be very hard work (almost impossible) because of missing documentation of RoMon protocol.

https://forum.mikrotik.com/viewtopic.php?t=133715

I have an dream that small changes could be performed via API connection (to any RoMon connected routers) by /tool/romon/ssh - let me know if you test it and it will work.

https://forum.mikrotik.com/viewtopic.php?t=99953

D

dansiegel commented 6 years ago

As I understand it RoMon connections use a SSH connection via an existing connection.

var localConnection = ConnectionFactory.OpenConnection(TikConnectionType.Api, HOST, USER, PASS);
var devices = localConnection.LoadAll<RoMonDevice>();
var remoteConnection = localConnection.OpenRoMonConnection(devices[0].Host, PASS);

I might imagine establishing the connection might be something like this. I would also say that managing the RoMon API would be great. I've been trying to use the EntityGenerator without any success.

danikf commented 5 years ago

Hi,

I have doublechecked your idea, but RoMon connection is not supported by 'not interactive' APIs like mikrotik API.

D