diff options
author | irungentoo <irungentoo@gmail.com> | 2014-08-14 14:31:26 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-08-14 14:31:26 -0400 |
commit | 78dd2234e017ea9f9e621c98ae9399caaf1f2601 (patch) | |
tree | 85db23c09c32bbe074a45f530ccc832cb8f00af5 /auto_tests/TCP_test.c | |
parent | f4b10c99ff0cbf5cdf88c639ee36516f76316ee5 (diff) |
Added basic socks5 proxy support to TCP client.
Diffstat (limited to 'auto_tests/TCP_test.c')
-rw-r--r-- | auto_tests/TCP_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index 25827df3..566013d7 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c | |||
@@ -381,7 +381,7 @@ START_TEST(test_client) | |||
381 | ip_port_tcp_s.port = htons(ports[rand() % NUM_PORTS]); | 381 | ip_port_tcp_s.port = htons(ports[rand() % NUM_PORTS]); |
382 | ip_port_tcp_s.ip.family = AF_INET6; | 382 | ip_port_tcp_s.ip.family = AF_INET6; |
383 | ip_port_tcp_s.ip.ip6.in6_addr = in6addr_loopback; | 383 | ip_port_tcp_s.ip.ip6.in6_addr = in6addr_loopback; |
384 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key); | 384 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key, 0); |
385 | c_sleep(50); | 385 | c_sleep(50); |
386 | do_TCP_connection(conn); | 386 | do_TCP_connection(conn); |
387 | ck_assert_msg(conn->status == TCP_CLIENT_UNCONFIRMED, "Wrong status. Expected: %u, is: %u", TCP_CLIENT_UNCONFIRMED, | 387 | ck_assert_msg(conn->status == TCP_CLIENT_UNCONFIRMED, "Wrong status. Expected: %u, is: %u", TCP_CLIENT_UNCONFIRMED, |
@@ -408,7 +408,7 @@ START_TEST(test_client) | |||
408 | uint8_t f2_public_key[crypto_box_PUBLICKEYBYTES]; | 408 | uint8_t f2_public_key[crypto_box_PUBLICKEYBYTES]; |
409 | uint8_t f2_secret_key[crypto_box_SECRETKEYBYTES]; | 409 | uint8_t f2_secret_key[crypto_box_SECRETKEYBYTES]; |
410 | crypto_box_keypair(f2_public_key, f2_secret_key); | 410 | crypto_box_keypair(f2_public_key, f2_secret_key); |
411 | TCP_Client_Connection *conn2 = new_TCP_connection(ip_port_tcp_s, self_public_key, f2_public_key, f2_secret_key); | 411 | TCP_Client_Connection *conn2 = new_TCP_connection(ip_port_tcp_s, self_public_key, f2_public_key, f2_secret_key, 0); |
412 | routing_response_handler(conn, response_callback, ((void *)conn) + 2); | 412 | routing_response_handler(conn, response_callback, ((void *)conn) + 2); |
413 | routing_status_handler(conn, status_callback, (void *)2); | 413 | routing_status_handler(conn, status_callback, (void *)2); |
414 | routing_data_handler(conn, data_callback, (void *)3); | 414 | routing_data_handler(conn, data_callback, (void *)3); |
@@ -475,7 +475,7 @@ START_TEST(test_client_invalid) | |||
475 | ip_port_tcp_s.port = htons(ports[rand() % NUM_PORTS]); | 475 | ip_port_tcp_s.port = htons(ports[rand() % NUM_PORTS]); |
476 | ip_port_tcp_s.ip.family = AF_INET6; | 476 | ip_port_tcp_s.ip.family = AF_INET6; |
477 | ip_port_tcp_s.ip.ip6.in6_addr = in6addr_loopback; | 477 | ip_port_tcp_s.ip.ip6.in6_addr = in6addr_loopback; |
478 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key); | 478 | TCP_Client_Connection *conn = new_TCP_connection(ip_port_tcp_s, self_public_key, f_public_key, f_secret_key, 0); |
479 | c_sleep(50); | 479 | c_sleep(50); |
480 | do_TCP_connection(conn); | 480 | do_TCP_connection(conn); |
481 | ck_assert_msg(conn->status == TCP_CLIENT_CONNECTING, "Wrong status. Expected: %u, is: %u", TCP_CLIENT_CONNECTING, | 481 | ck_assert_msg(conn->status == TCP_CLIENT_CONNECTING, "Wrong status. Expected: %u, is: %u", TCP_CLIENT_CONNECTING, |