Home » Developing U++ » UppHub » NetProxy package. (HTTP/SOCKS4/4a/5 with BIND support) encapsulation for U++
Re: NetProxy package. (HTTP/SOCKS4/4a/5 with BIND support) encapsulation for U++ [message #54197 is a reply to message #48812] |
Sat, 06 June 2020 23:04   |
Oblivion
Messages: 1223 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
NetProxy package has received a small update. (Minor bug fixes.)
Also, I've added two simple Socks5 connection examples to upp-components/Examples directory:
SocksProxyExample - Demonstrates a simple SOCKS5 connection, using NetProxy package.
SocksProxyExampleNB - Demonstrates a simple, non-blocking SOCKS5 connection, using NetProxy package.
SocksProxyExample:
#include <Core/Core.h>
#include <NetProxy/NetProxy.h>
using namespace Upp;
// This example demonstrates the basic usage of NetProxy class with socks5 tunnels.
// Default proxy server: Turk Telekom, a well-known ISP in Turkey. No auth required...
// Target server: test.rebex.net -> A well-known FTP/SFTP test server.
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
NetProxy::Trace();
const char *proxy_server = "88.249.26.113";
const int proxy_port = 1080;
TcpSocket sock;
NetProxy socksproxy(sock, proxy_server, proxy_port);
if(socksproxy.Timeout(10000).Socks5().Connect("test.rebex.net", 21)) {
RLOG("-------------");
RLOG(sock.GetLine()); // Get the first line of FTP server HELO...
RLOG("-------------");
return;
}
RLOG(socksproxy.GetErrorDesc());
}
If you have any questions, let me know.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sat, 06 June 2020 23:07] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Aug 14 16:29:35 CEST 2025
Total time taken to generate the page: 0.11243 seconds
|