import { Logger } from './logger'
import { SSLocal } from './ssLocal'

// TODO: expose a web endpoint to view the status of the connections

export default {
  start (servers) {
    console.log(servers)
    // create n * ssLocal instance
    let logger = new Logger('name1')
    let config = servers[0]
    let ssLocal = new SSLocal(config, logger)
    ssLocal.startServer()
  }
}
@@ -134,16 +134,45 @@
 ctions%0A%0A
+const ssLocalInstances = %5B%5D%0A%0A
 export d
@@ -208,64 +208,53 @@
     
-console.log(servers)%0A    // create n * ssLocal instance%0A
+for (let i = 0; i %3C servers.length; i++) %7B%0A  
     
@@ -282,20 +282,29 @@
 er('
-name1'
+ssLocal_' + i
 )%0A    
+ 
+ 
 let 
@@ -324,11 +324,13 @@
 ers%5B
-0
+i
 %5D%0A
+  
     
@@ -375,16 +375,18 @@
 er)%0A    
+  
 ssLocal.
@@ -399,13 +399,56 @@
 erver()%0A
+      ssLocalInstances.push(ssLocal)%0A    %7D%0A
   %7D%0A%7D

create multiple sslocal instances