Posted May 2, 2008 if(SETTING(OUTGOING_CONNECTIONS) == SettingsManager::OUTGOING_SOCKS5 && proxy) { if(udpServer.empty() || udpPort == 0) { throw SocketException(STRING(SOCKS_SETUP_ERROR)); } serv_addr.sin_port = htons(udpPort); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = inet_addr(udpServer.c_str()); string s = BOOLSETTING(SOCKS_RESOLVE) ? resolve(ip) : ip; vector<uint8_t> connStr; connStr.push_back(0); // Reserved connStr.push_back(0); // Reserved connStr.push_back(0); // Fragment number, always 0 in our case... if(BOOLSETTING(SOCKS_RESOLVE)) { connStr.push_back(3); connStr.push_back((uint8_t)s.size()); connStr.insert(connStr.end(), aAddr.begin(), aAddr.end()); } else { replace it to if(SETTING(OUTGOING_CONNECTIONS) == SettingsManager::OUTGOING_SOCKS5 && proxy) { if(udpServer.empty() || udpPort == 0) { throw SocketException(STRING(SOCKS_SETUP_ERROR)); } serv_addr.sin_port = htons(udpPort); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = inet_addr(udpServer.c_str()); // string s = BOOLSETTING(SOCKS_RESOLVE) ? resolve(ip) : ip; vector<uint8_t> connStr; connStr.push_back(0); // Reserved connStr.push_back(0); // Reserved connStr.push_back(0); // Fragment number, always 0 in our case... if(BOOLSETTING(SOCKS_RESOLVE)) { connStr.push_back(3); connStr.push_back((uint8_t)aAddr.size()); connStr.insert(connStr.end(), aAddr.begin(), aAddr.end()); } else { Share this post Link to post Share on other sites
Posted May 2, 2008 What is the problem with the code as it is? I wasn't aware of a bug, but i'm always glad of a fix, but what am I fixing? Share this post Link to post Share on other sites
Posted May 2, 2008 What is the problem with the code as it is? I wasn't aware of a bug, but i'm always glad of a fix, but what am I fixing? peer can't send search result when working through socks5 proxy Share this post Link to post Share on other sites
Posted May 3, 2008 Sure this must be moved to 'Bugs' section. Anyway. Share this post Link to post Share on other sites
Posted May 4, 2008 And fixed upstream if it comes from there ? (StrongDC++ or DC++) Share this post Link to post Share on other sites