Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tinyNET/src/tnet_proxy_node_socks_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,11 @@ static int _tnet_proxy_node_socks_plugin_set_handshaking_data(tnet_proxy_node_t*
if (node->handshacking.socks5_auth_method == kSocks5AuthMethodNone) {
node->handshacking.socks5_state = socks5_state_conn_req;
// FIXME:
TSK_DEBUG_ERROR("Not implemented yet");
/*TSK_DEBUG_ERROR("Not implemented yet");
ret = -3;
goto bail;
goto bail;*/
//no need authentication,build connect request
goto connect_request;
}
else {
if (node->handshacking.socks5_auth_method == kSocks5AuthMethodUsrPwd) {
Expand Down Expand Up @@ -505,7 +507,8 @@ static int _tnet_proxy_node_socks_plugin_set_handshaking_data(tnet_proxy_node_t*
}

// State changed from "auth_req" to "conn_req" : build connection request
if (node->handshacking.socks5_state == socks5_state_conn_req) {
connect_request:
if (node->handshacking.socks5_state == socks5_state_conn_req) {
#define kAddrTypeIPv4 0x01
#define kAddrTypeDomaineName 0x03
#define kAddrTypeIPv6 0x04
Expand Down Expand Up @@ -614,6 +617,8 @@ static int _tnet_proxy_node_socks_plugin_set_handshaking_data(tnet_proxy_node_t*
return ret;
}



static int _tnet_proxy_node_socks_plugin_get_handshaking_pending_data(tnet_proxy_node_t* self, void** data_pptr, tsk_size_t* data_psize)
{
tnet_proxy_node_socks_plugin_t* node = (tnet_proxy_node_socks_plugin_t*)self;
Expand Down
4 changes: 2 additions & 2 deletions tinyNET/src/tnet_proxy_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int tnet_proxy_node_configure_2(tnet_proxy_node_t* self, va_list* app)
// (const char*)(HOST_STR), (int)(PORT_INT)
const char* HOST_STR = va_arg(*app, const char*);
int PORT_INT = va_arg(*app, int);
if (PORT_INT < 1 || PORT_INT > 0xFFF) {
if (PORT_INT < 1 || PORT_INT > 0xFFFF) {
TSK_DEBUG_ERROR("Invalid value for port number: %d", PORT_INT);
ret = -3;
goto bail;
Expand Down Expand Up @@ -289,4 +289,4 @@ tnet_proxy_node_t* tnet_proxy_node_create(enum tnet_proxy_type_e type)
}
}
return node;
}
}
Loading