diff options
-rw-r--r-- | anymux.cpp | 4 | ||||
-rw-r--r-- | logo/Logo_ANYTUN_150x132.png | bin | 0 -> 13500 bytes | |||
-rw-r--r-- | logo/Logo_ANYTUN_170x150.png | bin | 0 -> 15304 bytes | |||
-rw-r--r-- | muxSocket.cpp | 18 | ||||
-rw-r--r-- | testoutput.txt | 42 |
5 files changed, 58 insertions, 6 deletions
@@ -73,9 +73,9 @@ int main(int argc, char* argv[]) sig.init(); // ThreadParam p(4445); - int p; + int port; pthread_t syncListenerThread; - pthread_create(&syncListenerThread, NULL, syncListener, &p); + pthread_create(&syncListenerThread, NULL, syncListener, &port); int ret = sig.run(); diff --git a/logo/Logo_ANYTUN_150x132.png b/logo/Logo_ANYTUN_150x132.png Binary files differnew file mode 100644 index 0000000..31d6891 --- /dev/null +++ b/logo/Logo_ANYTUN_150x132.png diff --git a/logo/Logo_ANYTUN_170x150.png b/logo/Logo_ANYTUN_170x150.png Binary files differnew file mode 100644 index 0000000..d7f1355 --- /dev/null +++ b/logo/Logo_ANYTUN_170x150.png diff --git a/muxSocket.cpp b/muxSocket.cpp index 8adfb2b..629ec45 100644 --- a/muxSocket.cpp +++ b/muxSocket.cpp @@ -1,10 +1,10 @@ #include <sstream> #include <iostream> +#include <fstream> #include <string> #include "Sockets/Utility.h" #include "muxSocket.h" -//#include "log.h" #ifdef SOCKETS_NAMESPACE using namespace SOCKETS_NAMESPACE; @@ -21,10 +21,20 @@ MuxSocket::MuxSocket(ISocketHandler& h) void MuxSocket::OnAccept() { - Send( Utility::GetLocalHostname() + "\n"); - Send( Utility::GetLocalAddress() + "\n"); - Send("Number of sockets in list : " + Utility::l2string(Handler().GetCount()) + "\n"); + std::string filename("testoutput.txt"); + std::ifstream file(filename.c_str()); + if( file.is_open() ) + { + std::string line; + while( !file.eof() ) + { + getline( file, line ); + Send( line + "\n" ); + } + file.close(); + } Send("\n"); + //TODO Locking here } diff --git a/testoutput.txt b/testoutput.txt new file mode 100644 index 0000000..bcc9cbf --- /dev/null +++ b/testoutput.txt @@ -0,0 +1,42 @@ +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' tunDevice.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' packetSource.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' buffer.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncBuffer.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncCommand.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncRouteCommand.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncConnectionCommand.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' plainPacket.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' encryptedPacket.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' cipher.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' authAlgo.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' authTag.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' keyDerivation.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' mpi.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' cipherFactory.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' muxSocket.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' authAlgoFactory.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' keyDerivationFactory.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' connectionList.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' connectionParam.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' networkAddress.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' networkPrefix.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' PracticalSocket.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' router.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' routingTable.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' routingTableEntry.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' signalController.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncSocket.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncSocketHandler.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncClientSocket.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' syncQueue.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' log.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' options.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' seqWindow.cpp -c +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' anytun.cpp -c +g++ tunDevice.o packetSource.o buffer.o syncBuffer.o syncCommand.o syncRouteCommand.o syncConnectionCommand.o plainPacket.o encryptedPacket.o cipher.o authAlgo.o authTag.o keyDerivation.o mpi.o cipherFactory.o muxSocket.o authAlgoFactory.o keyDerivationFactory.o connectionList.o connectionParam.o networkAddress.o networkPrefix.o PracticalSocket.o router.o routingTable.o routingTableEntry.o signalController.o syncSocket.o syncSocketHandler.o syncClientSocket.o syncQueue.o log.o options.o seqWindow.o openvpn/tun.o openvpn/error.o openvpn/socket.o openvpn/buffer.o openvpn/misc.o openvpn/manage.o openvpn/fdmisc.o openvpn/otime.o openvpn/options.o openvpn/mtu.o openvpn/plugin.o openvpn/sig.o openvpn/proxy.o openvpn/socks.o openvpn/status.o openvpn/event.o openvpn/route.o openvpn/helper.o openvpn/init.o openvpn/interval.o openvpn/base64.o openvpn/shaper.o openvpn/fragment.o Sockets/libSockets.a anytun.o -o anytun -g -Wall -O2 -ldl -lpthread -lgcrypt -lssl -lboost_serialization +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' anyctr.cpp -c +g++ tunDevice.o packetSource.o buffer.o syncBuffer.o syncCommand.o syncRouteCommand.o syncConnectionCommand.o plainPacket.o encryptedPacket.o cipher.o authAlgo.o authTag.o keyDerivation.o mpi.o cipherFactory.o muxSocket.o authAlgoFactory.o keyDerivationFactory.o connectionList.o connectionParam.o networkAddress.o networkPrefix.o PracticalSocket.o router.o routingTable.o routingTableEntry.o signalController.o syncSocket.o syncSocketHandler.o syncClientSocket.o syncQueue.o log.o options.o seqWindow.o openvpn/tun.o openvpn/error.o openvpn/socket.o openvpn/buffer.o openvpn/misc.o openvpn/manage.o openvpn/fdmisc.o openvpn/otime.o openvpn/options.o openvpn/mtu.o openvpn/plugin.o openvpn/sig.o openvpn/proxy.o openvpn/socks.o openvpn/status.o openvpn/event.o openvpn/route.o openvpn/helper.o openvpn/init.o openvpn/interval.o openvpn/base64.o openvpn/shaper.o openvpn/fragment.o Sockets/libSockets.a anyctr.o -o anyctr -g -Wall -O2 -ldl -lpthread -lgcrypt -lssl -lboost_serialization +g++ -g -Wall -DSOCKETS_NAMESPACE=sockets -DSOCKETS_NAMESPACE_STR='"sockets"' anymux.cpp -c +g++ tunDevice.o packetSource.o buffer.o syncBuffer.o syncCommand.o syncRouteCommand.o syncConnectionCommand.o plainPacket.o encryptedPacket.o cipher.o authAlgo.o authTag.o keyDerivation.o mpi.o cipherFactory.o muxSocket.o authAlgoFactory.o keyDerivationFactory.o connectionList.o connectionParam.o networkAddress.o networkPrefix.o PracticalSocket.o router.o routingTable.o routingTableEntry.o signalController.o syncSocket.o syncSocketHandler.o syncClientSocket.o syncQueue.o log.o options.o seqWindow.o openvpn/tun.o openvpn/error.o openvpn/socket.o openvpn/buffer.o openvpn/misc.o openvpn/manage.o openvpn/fdmisc.o openvpn/otime.o openvpn/options.o openvpn/mtu.o openvpn/plugin.o openvpn/sig.o openvpn/proxy.o openvpn/socks.o openvpn/status.o openvpn/event.o openvpn/route.o openvpn/helper.o openvpn/init.o openvpn/interval.o openvpn/base64.o openvpn/shaper.o openvpn/fragment.o Sockets/libSockets.a anymux.o -o anymux -g -Wall -O2 -ldl -lpthread -lgcrypt -lssl -lboost_serialization +ar cru libAnysync.a tunDevice.o packetSource.o buffer.o syncBuffer.o syncCommand.o syncRouteCommand.o syncConnectionCommand.o plainPacket.o encryptedPacket.o cipher.o authAlgo.o authTag.o keyDerivation.o mpi.o cipherFactory.o muxSocket.o authAlgoFactory.o keyDerivationFactory.o connectionList.o connectionParam.o networkAddress.o networkPrefix.o PracticalSocket.o router.o routingTable.o routingTableEntry.o signalController.o syncSocket.o syncSocketHandler.o syncClientSocket.o syncQueue.o log.o options.o seqWindow.o openvpn/tun.o openvpn/error.o openvpn/socket.o openvpn/buffer.o openvpn/misc.o openvpn/manage.o openvpn/fdmisc.o openvpn/otime.o openvpn/options.o openvpn/mtu.o openvpn/plugin.o openvpn/sig.o openvpn/proxy.o openvpn/socks.o openvpn/status.o openvpn/event.o openvpn/route.o openvpn/helper.o openvpn/init.o openvpn/interval.o openvpn/base64.o openvpn/shaper.o openvpn/fragment.o Sockets/libSockets.a +ranlib libAnysync.a |