Index: branches/proxy/src/lib/network/handshake.cc
===================================================================
--- branches/proxy/src/lib/network/handshake.cc	(revision 9359)
+++ branches/proxy/src/lib/network/handshake.cc	(revision 9360)
@@ -48,6 +48,10 @@
   registerVar( new SynchronizeableString( &localState.preferedNickName, &remoteState.preferedNickName, "preferedNickName", PERMISSION_ALL ) );
   // now synchronize only two of the available proxy server addresses
-  proxy1Handler = registerVarId( new SynchronizeableIP( &localState.proxy1, &remoteState.proxy1, "proxy server 1", PERMISSION_ALL ) );
-  proxy2Handler = registerVarId( new SynchronizeableIP( &localState.proxy2, &remoteState.proxy2, "proxy server 2", PERMISSION_ALL ) );
+//   registerVar( new SynchronizeableIP( &this->proxy1, &this->proxy1, "proxy server 1", PERMISSION_ALL ) );
+//   registerVar( new SynchronizeableIP( &this->proxy2, &this->proxy2, "proxy server 2", PERMISSION_ALL ) );
+  registerVar( new SynchronizeableInt( this->proxy1.hostRef(), this->proxy1.hostRef(), "proxy server 1", PERMISSION_ALL));
+  registerVar( new SynchronizeableInt( this->proxy1.portRef(), this->proxy1.portRef(), "proxy server 1", PERMISSION_ALL));
+  registerVar( new SynchronizeableInt( this->proxy2.hostRef(), this->proxy2.hostRef(), "proxy server 2", PERMISSION_ALL));
+  registerVar( new SynchronizeableInt( this->proxy2.portRef(), this->proxy2.portRef(), "proxy server 2", PERMISSION_ALL));
 
   // init the local state
@@ -62,7 +66,4 @@
   localState.nodeType = nodeType;
   localState.canDel = 0;
-  localState.redirectProxy = 0;
-  localState.proxy1 = IP(0, 0);
-  localState.proxy2 = IP (0, 0);
 
 
@@ -78,10 +79,10 @@
   remoteState.nodeType = NET_CLIENT;
   remoteState.canDel = 0;
-  remoteState.redirectProxy = 0;
-  remoteState.proxy1 = IP(0, 0);
-  remoteState.proxy2 = IP(0, 0);
 
 
-  this->proxyAddressesSynched = 0;
+  this->proxyAddressesSynched = 2;
+  this->proxy1 = IP(0, 0);
+  this->proxy2 = IP(0, 0);
+  this->redirectProxy = 0;
 
 
@@ -151,5 +152,5 @@
     {
       this->proxyAddressesSynched++;
-      PRINTF(0)("got proxy1: %i, %i\n", this->remoteState.proxy1.host(), this->remoteState.proxy1.port());
+      PRINTF(0)("got proxy1: %i, %i\n", this->proxy1.host(), this->proxy1.port());
     }
 
@@ -158,5 +159,5 @@
     {
       this->proxyAddressesSynched++;
-      PRINTF(0)("got proxy2: %i, %i\n", this->remoteState.proxy2.host(), this->remoteState.proxy2.port());
+      PRINTF(0)("got proxy2: %i, %i\n", this->proxy2.host(), this->proxy2.port());
     }
 
Index: branches/proxy/src/lib/network/handshake.h
===================================================================
--- branches/proxy/src/lib/network/handshake.h	(revision 9359)
+++ branches/proxy/src/lib/network/handshake.h	(revision 9360)
@@ -14,4 +14,5 @@
 #include "ip.h"
 #include "synchronizeable.h"
+#include "shared_network_data.h"
 
 //!< a struct to save the handshakes to
@@ -35,8 +36,4 @@
   //additional data
   std::string   preferedNickName;              //!< prefered nick name
-
-  int           redirectProxy;                 //!< true if the client should reconnect to a proxy server (either 1 or 2 )
-  IP            proxy1;                        //!< ip address of the first proxy (0.0.0.0 of not available)
-  IP            proxy2;                        //!< ip address of the second proxy (0.0.0.0 of not available)
 };
 
@@ -81,16 +78,16 @@
 
     /** @returns if true the local client should reconnect to a proxy server from the proxy server list */
-    inline bool redirect() { return this->remoteState.redirectProxy;}
+    inline bool redirect() { return this->redirectProxy;}
     /** @param flag: indicating if the client should be redirected */
-    inline void setRedirect(bool flag) { this->localState.redirectProxy = flag; }
+    inline void setRedirect(bool flag) { this->redirectProxy = flag; }
 
     /** @param address: the address of the proxy server 1 if any */
-    inline void setProxy1Address(IP address) { this->localState.proxy1 = address; }
+    inline void setProxy1Address(IP address) { if( !SharedNetworkData::getInstance()->isMasterServer()) return; this->proxy1 = address; }
     /** @returns the address of the proxy server 1 if any */
-    inline IP getProxy1Address() { return this->remoteState.proxy1; }
+    inline IP getProxy1Address() { return this->proxy1; }
     /** @param address: the address of the proxy server 2 if any */
-    inline void setProxy2Address(IP address) { this->localState.proxy2 = address; }
+    inline void setProxy2Address(IP address) { this->proxy2 = address; }
     /** @returns the address of the proxy server 2 if any */
-    inline IP getProxy2Address() { return this->remoteState.proxy2; }
+    inline IP getProxy2Address() { return this->proxy2; }
 
 
@@ -119,5 +116,7 @@
 
     int                proxyAddressesSynched;                 //!< number of addresses synched
-
+    int                redirectProxy;                         //!< true if the client should reconnect to a proxy server
+    IP                 proxy1;                               //!< ip address of the first proxy (0.0.0.0 of not available)
+    IP                 proxy2;                               //!< ip address of the second proxy (0.0.0.0 of not available)
 };
 
Index: branches/proxy/src/lib/network/ip.cc
===================================================================
--- branches/proxy/src/lib/network/ip.cc	(revision 9359)
+++ branches/proxy/src/lib/network/ip.cc	(revision 9360)
@@ -256,5 +256,5 @@
 
 /// default port definition.
-short IP::_defaultPort = 9999;
+int IP::_defaultPort = 9999;
 
 /**
@@ -262,5 +262,5 @@
  * @param defaultPort The default port.
  */
-void IP::setDefaultPort(short defaultPort)
+void IP::setDefaultPort(int defaultPort)
 {
   IP::_defaultPort = defaultPort;
Index: branches/proxy/src/lib/network/ip.h
===================================================================
--- branches/proxy/src/lib/network/ip.h	(revision 9359)
+++ branches/proxy/src/lib/network/ip.h	(revision 9360)
@@ -36,6 +36,9 @@
     /** @returns the IP */
     int host() const { return this->_ip; };
+    int* hostRef()  { return &this->_ip; }
     /** @returns the Port */
-    short port() const { return this->_port; };
+    int port() const { return this->_port; };
+    int* portRef() { return &this->_port; };
+
     inline IPaddress getSDLNotation() { IPaddress sdlIP; sdlIP.host = this->_ip; sdlIP.port = this->_port; return sdlIP; }
 
@@ -52,12 +55,12 @@
     static std::string ipToString(int ip, int port = -1);
 
-    static void setDefaultPort(short defaultPort);
-    static short defaultPort(short defaultPort) { return IP::_defaultPort; };
+    static void setDefaultPort(int defaultPort);
+    static int defaultPort(int defaultPort) { return IP::_defaultPort; };
 
   private:
     int           _ip;           //!< The IP in int form.
-    short         _port;         //!< The Port number of the IP
+    int         _port;         //!< The Port number of the IP
 
-    static short  _defaultPort;  //!< Default Port
+    static int  _defaultPort;  //!< Default Port
 };
 
Index: branches/proxy/src/lib/network/network_stream.cc
===================================================================
--- branches/proxy/src/lib/network/network_stream.cc	(revision 9359)
+++ branches/proxy/src/lib/network/network_stream.cc	(revision 9360)
@@ -488,4 +488,5 @@
         if ( it->second.handshake->ok() )
         {
+          // the server gave it free for deletion
           if ( !it->second.handshake->allowDel() )
           {
@@ -568,4 +569,6 @@
   PRINTF(0)("Client is redirected to the other proxy servers\n");
   PRINTF(0)("===============================================\n");
+
+  return;
 
   PeerInfo* pInfo = &this->peers[userId];
Index: branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_ip.cc
===================================================================
--- branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_ip.cc	(revision 9359)
+++ branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_ip.cc	(revision 9360)
@@ -51,4 +51,5 @@
   n += res;
 
+
   res = Converter::intToByteArray( (int)vPtrIn->port(), buf, maxLength);
   assert(res > 0);
@@ -89,7 +90,7 @@
 
   printf(" %s old: %i, %i -- new: %i, %i\n", name.c_str(), oldVal.host(), oldVal.port(), this->vPtrOut->host(), this->vPtrOut->port());
-  setHasChanged( *this->vPtrOut != oldVal);
+  this->setHasChanged( *this->vPtrOut != oldVal);
 
-  assert( n == 2 * INTSIZE);
+//   assert( n == 2 * INTSIZE);
 
   return n;
