Index: branches/proxy/src/lib/network/monitor/network_monitor.cc
===================================================================
--- branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9296)
+++ branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9300)
@@ -19,7 +19,13 @@
 #include "debug.h"
 
+#include "proxy/proxy_settings.h"
+
 #include "network_monitor.h"
 #include "network_node.h"
+#include "peer_info.h"
 #include "network_stream.h"
+#include "netdefs.h"
+
+#include <vector>
 
 
@@ -45,4 +51,19 @@
 
   this->setSynchronized(false);
+
+  // assuming that the config files are already read we get the proxy servers
+  std::vector<IPaddress*>* proxyList = &ProxySettings::getInstance()->getProxyList();
+  std::vector<IPaddress*>::iterator it = proxyList->begin();
+  // create a peer info class and a network node class for each new proxy and add them to the passive list
+  for(; it < proxyList->end(); it++)
+  {
+    PeerInfo* peer = new PeerInfo();
+    peer->ip = *(*it);
+    peer->nodeType = NET_PROXY_SERVER;
+    peer->userId = -1;
+
+    NetworkNode* node = new NetworkNode(peer);
+    this->addPassiveProxyServer( this->localNode, peer);
+  }
 }
 
@@ -86,4 +107,11 @@
 }
 
+/**
+ * tihs adds the new network node
+ * @param ip ip of the new node
+ */
+void NetworkMonitor::addNode(IPaddress ip)
+{}
+
 
 /**
@@ -128,4 +156,24 @@
   else if( pInfo->isMasterServer())
     node->addMasterServer(pInfo);
+}
+
+
+/**
+ * @returns the proxy server of the first choice
+ */
+PeerInfo* NetworkMonitor::getFirstChoiceProxy()
+{
+  // return the fist proxy in the list
+  return this->localNode->getActiveProxyServer(0);
+}
+
+
+/**
+ * @returns the proxy server of second choice
+ */
+PeerInfo* NetworkMonitor::getSecondChoiceProxy()
+{
+  // return the second server in the list
+  return this->localNode->getActiveProxyServer(1);
 }
 
@@ -185,4 +233,6 @@
   }
 
+  // check if a proxy server has to activated
+
   this->debug();
 }
Index: branches/proxy/src/lib/network/monitor/network_monitor.h
===================================================================
--- branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9296)
+++ branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9300)
@@ -34,4 +34,5 @@
     void removeNetworkNode(NetworkNode* node);
 
+    void addNode(IPaddress ip);
     void addNode(PeerInfo* pInfo);
     void addNode(NetworkNode* node) { this->nodeList.push_back(node); }
@@ -42,4 +43,6 @@
     /** adds to @param node a network node @param pInfo a new proxy server */
     inline void addActiveProxyServer(NetworkNode* node, PeerInfo* pInfo) { node->addActiveProxyServer(pInfo); }
+    /** adds to @param node a network node @param pInfo a new proxy server */
+    inline void addPassiveProxyServer(NetworkNode* node, PeerInfo* pInfo) { node->addPassiveProxyServer(pInfo); }
     /** adds to @param node a network node @param pInfo a new master server*/
     inline void addMasterServer(NetworkNode* node, PeerInfo* pInfo) { node->addMasterServer(pInfo); }
@@ -47,4 +50,5 @@
     inline void removeClient(NetworkNode* node, PeerInfo* pInfo) { node->removeClient(pInfo); }
     inline void removeActiveProxyServer(NetworkNode* node, PeerInfo* pInfo) { node->removeActiveProxyServer(pInfo); }
+    inline void removePassiveProxyServer(NetworkNode* node, PeerInfo* pInfo) { node->removePassiveProxyServer(pInfo); }
     inline void removeMasterServer(NetworkNode* node, PeerInfo* pInfo) { node->removeMasterServer(pInfo); }
 
@@ -57,5 +61,8 @@
     /** @param node node to be checked for slots @returns true if there are still free network slots available at this node */
     inline bool gotFreeSlots(NetworkNode* node) { return (node->getPlayerNumber() < NET_MAX_CONNECTIONS)?true:false; }
-    void getServerWithFreeSlots() { }
+    PeerInfo* getFirstChoiceProxy();
+    PeerInfo* getSecondChoiceProxy();
+    /** @returns true if the next client should be reconnected to some other proxy server with more connections */
+    inline bool reconnectNextClient() { return (this->localNode->getPlayerNumber() >= NET_MAX_CONNECTIONS)?true:false; }
 
 
Index: branches/proxy/src/lib/network/monitor/network_node.cc
===================================================================
--- branches/proxy/src/lib/network/monitor/network_node.cc	(revision 9296)
+++ branches/proxy/src/lib/network/monitor/network_node.cc	(revision 9300)
@@ -147,4 +147,83 @@
 
 
+/**
+ * @param index index to the client
+ * @return the client in the list or NULL if none
+ */
+PeerInfo* NetworkNode::getClient(int index)
+{
+  if( this->clientList.size() < index)
+    return NULL;
+
+  std::list<PeerInfo*>::iterator it = this->clientList.begin();
+  for(int i = 0; it != this->clientList.end(); it++, i++)
+  {
+  if( i == index)
+    return (*it);
+  }
+
+  return NULL;
+}
+
+
+/**
+ * @param index index to the client
+ * @return the active proxy server in the list or NULL if none
+ */
+PeerInfo* NetworkNode::getActiveProxyServer(int index)
+{
+  if( this->activeProxyServerList.size() < index)
+    return NULL;
+
+  std::list<PeerInfo*>::iterator it = this->activeProxyServerList.begin();
+  for(int i = 0; it != this->activeProxyServerList.end(); it++, i++)
+  {
+    if( i == index)
+      return (*it);
+  }
+
+  return NULL;
+}
+
+
+/**
+ * @param index index to the client
+ * @return the passive proxy server in the list or NULL if none
+ */
+PeerInfo* NetworkNode::getPassiveProxyServer(int index)
+{
+  if( this->passiveProxyServerList.size() < index)
+    return NULL;
+
+  std::list<PeerInfo*>::iterator it = this->passiveProxyServerList.begin();
+  for(int i = 0; it != this->passiveProxyServerList.end(); it++, i++)
+  {
+    if( i == index)
+      return (*it);
+  }
+
+  return NULL;
+}
+
+
+/**
+ * @param index index to the client
+ * @return the master server in the list or NULL if none
+ */
+PeerInfo* NetworkNode::getMasterServer(int index)
+{
+  if( this->masterServerList.size() < index)
+    return NULL;
+
+  std::list<PeerInfo*>::iterator it = this->masterServerList.begin();
+  for(int i = 0; it != this->masterServerList.end(); it++, i++)
+  {
+    if( i == index)
+      return (*it);
+  }
+
+  return NULL;
+}
+
 
 /**
Index: branches/proxy/src/lib/network/monitor/network_node.h
===================================================================
--- branches/proxy/src/lib/network/monitor/network_node.h	(revision 9296)
+++ branches/proxy/src/lib/network/monitor/network_node.h	(revision 9300)
@@ -32,4 +32,9 @@
     void removeMasterServer(PeerInfo* node);
 
+    PeerInfo* getClient(int index);
+    PeerInfo* getActiveProxyServer(int index);
+    PeerInfo* getPassiveProxyServer(int index);
+    PeerInfo* getMasterServer(int index);
+
     /** @returns the number of players */
     inline int getPlayerNumber() { return this->playerNumber; }
