From ffe2e2cc6df63c5abed7db7d7d5901681fefe791 Mon Sep 17 00:00:00 2001 From: fadhil riyanto Date: Sat, 5 Oct 2024 18:53:48 +0700 Subject: fix network to host order Signed-off-by: fadhil riyanto --- main2.c | 4 ++-- 1 file 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 -- cgit v1.2.3