summaryrefslogtreecommitdiff
path: root/main2.c
diff options
context:
space:
mode:
authorfadhil riyanto <me@fadev.org>2024-10-05 18:53:48 +0700
committerfadhil riyanto <me@fadev.org>2024-10-05 18:53:48 +0700
commitffe2e2cc6df63c5abed7db7d7d5901681fefe791 (patch)
tree63243271d2b0d833e13034c68ee3515ec08bad55 /main2.c
parentca2ec97c4ae4353cf30d765987975789d367d494 (diff)
fix network to host order
Signed-off-by: fadhil riyanto <me@fadev.org>
Diffstat (limited to 'main2.c')
-rw-r--r--main2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main2.c b/main2.c
index 3efd604..d812f84 100644
--- a/main2.c
+++ b/main2.c
@@ -572,9 +572,9 @@ static int start_unpack_packet_no_epl(int fd, void* reserved, struct socks5_sess
struct next_req_ipv4 *next_req = (struct next_req_ipv4*)buf;
- printf("SOCKS_REQ ver: %c; CMD: %s; type: %s; ip: %u.%u.%u.%u:%u\n", buf[0],
+ printf("SOCKS_REQ ver: %c; CMD: %s; type: %s; ip: %u.%u.%u.%u:%d\n", buf[0],
cmd2str(next_req->cmd), ip2str(buf[3]), next_req->dest[0], next_req->dest[1], next_req->dest[2], next_req->dest[3],
- (uint16_t)next_req->port);
+ ntohs(next_req->port));
}
// if1