diff options
Diffstat (limited to 'src/transport')
5 files changed, 180 insertions, 0 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 8ca01eaf7..d8821e499 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -10,6 +10,7 @@ if HAVE_MHD | |||
10 | HTTP_NAT_API_TEST = test_transport_api_http_nat | 10 | HTTP_NAT_API_TEST = test_transport_api_http_nat |
11 | HTTP_API_TIMEOUT_TEST = test_transport_api_timeout_http | 11 | HTTP_API_TIMEOUT_TEST = test_transport_api_timeout_http |
12 | HTTP_REL_TEST = test_transport_api_reliability_http | 12 | HTTP_REL_TEST = test_transport_api_reliability_http |
13 | HTTP_NAT_REL_TEST = test_transport_api_reliability_http_nat | ||
13 | HTTP_QUOTA_TEST = test_quota_compliance_http \ | 14 | HTTP_QUOTA_TEST = test_quota_compliance_http \ |
14 | test_quota_compliance_http_asymmetric_recv_constant | 15 | test_quota_compliance_http_asymmetric_recv_constant |
15 | HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la | 16 | HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la |
@@ -17,6 +18,7 @@ if HAVE_MHD | |||
17 | HTTPS_NAT_API_TEST = test_transport_api_https_nat | 18 | HTTPS_NAT_API_TEST = test_transport_api_https_nat |
18 | HTTPS_API_TIMEOUT_TEST = test_transport_api_timeout_https | 19 | HTTPS_API_TIMEOUT_TEST = test_transport_api_timeout_https |
19 | HTTPS_REL_TEST = test_transport_api_reliability_https | 20 | HTTPS_REL_TEST = test_transport_api_reliability_https |
21 | HTTPS_NAT_REL_TEST = test_transport_api_reliability_https_nat | ||
20 | HTTPS_QUOTA_TEST = test_quota_compliance_https \ | 22 | HTTPS_QUOTA_TEST = test_quota_compliance_https \ |
21 | test_quota_compliance_https_asymmetric_recv_constant | 23 | test_quota_compliance_https_asymmetric_recv_constant |
22 | endif | 24 | endif |
@@ -273,7 +275,9 @@ check_PROGRAMS = \ | |||
273 | test_transport_api_unreliability_constant_udp \ | 275 | test_transport_api_unreliability_constant_udp \ |
274 | $(UNIX_REL_TEST) \ | 276 | $(UNIX_REL_TEST) \ |
275 | $(HTTP_REL_TEST) \ | 277 | $(HTTP_REL_TEST) \ |
278 | $(HTTP_NAT_REL_TEST) \ | ||
276 | $(HTTPS_REL_TEST) \ | 279 | $(HTTPS_REL_TEST) \ |
280 | $(HTTPS_NAT_REL_TEST) \ | ||
277 | test_quota_compliance_tcp \ | 281 | test_quota_compliance_tcp \ |
278 | test_quota_compliance_tcp_asymmetric_recv_constant \ | 282 | test_quota_compliance_tcp_asymmetric_recv_constant \ |
279 | test_quota_compliance_udp \ | 283 | test_quota_compliance_udp \ |
@@ -310,7 +314,9 @@ TESTS = \ | |||
310 | test_transport_api_unreliability_constant_udp \ | 314 | test_transport_api_unreliability_constant_udp \ |
311 | $(UNIX_REL_TEST) \ | 315 | $(UNIX_REL_TEST) \ |
312 | $(HTTP_REL_TEST) \ | 316 | $(HTTP_REL_TEST) \ |
317 | $(HTTP_NAT_REL_TEST) \ | ||
313 | $(HTTPS_REL_TEST) \ | 318 | $(HTTPS_REL_TEST) \ |
319 | $(HTTPS_NAT_REL_TEST) \ | ||
314 | test_quota_compliance_tcp \ | 320 | test_quota_compliance_tcp \ |
315 | test_quota_compliance_tcp_asymmetric_recv_constant \ | 321 | test_quota_compliance_tcp_asymmetric_recv_constant \ |
316 | test_quota_compliance_udp \ | 322 | test_quota_compliance_udp \ |
@@ -492,6 +498,14 @@ test_transport_api_reliability_http_LDADD = \ | |||
492 | $(top_builddir)/src/util/libgnunetutil.la \ | 498 | $(top_builddir)/src/util/libgnunetutil.la \ |
493 | $(top_builddir)/src/transport/libgnunettransporttesting.la | 499 | $(top_builddir)/src/transport/libgnunettransporttesting.la |
494 | 500 | ||
501 | test_transport_api_reliability_http_nat_SOURCES = \ | ||
502 | test_transport_api_reliability.c | ||
503 | test_transport_api_reliability_http_nat_LDADD = \ | ||
504 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
505 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
506 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
507 | $(top_builddir)/src/transport/libgnunettransporttesting.la | ||
508 | |||
495 | test_transport_api_https_SOURCES = \ | 509 | test_transport_api_https_SOURCES = \ |
496 | test_transport_api.c | 510 | test_transport_api.c |
497 | test_transport_api_https_LDADD = \ | 511 | test_transport_api_https_LDADD = \ |
@@ -516,6 +530,14 @@ test_transport_api_reliability_https_LDADD = \ | |||
516 | $(top_builddir)/src/util/libgnunetutil.la \ | 530 | $(top_builddir)/src/util/libgnunetutil.la \ |
517 | $(top_builddir)/src/transport/libgnunettransporttesting.la | 531 | $(top_builddir)/src/transport/libgnunettransporttesting.la |
518 | 532 | ||
533 | test_transport_api_reliability_https_nat_SOURCES = \ | ||
534 | test_transport_api_reliability.c | ||
535 | test_transport_api_reliability_https_nat_LDADD = \ | ||
536 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
537 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
538 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
539 | $(top_builddir)/src/transport/libgnunettransporttesting.la | ||
540 | |||
519 | test_transport_api_unreliability_unix_SOURCES = \ | 541 | test_transport_api_unreliability_unix_SOURCES = \ |
520 | test_transport_api_unreliability.c | 542 | test_transport_api_unreliability.c |
521 | test_transport_api_unreliability_unix_LDADD = \ | 543 | test_transport_api_unreliability_unix_LDADD = \ |
diff --git a/src/transport/test_transport_api_reliability_http_nat_peer1.conf b/src/transport/test_transport_api_reliability_http_nat_peer1.conf new file mode 100644 index 000000000..48707a730 --- /dev/null +++ b/src/transport/test_transport_api_reliability_http_nat_peer1.conf | |||
@@ -0,0 +1,44 @@ | |||
1 | @INLINE@ test_transport_defaults.conf | ||
2 | [PATHS] | ||
3 | SERVICEHOME = /tmp/test-transport/api-http-p1/ | ||
4 | DEFAULTCONFIG = test_transport_api_http_nat_peer1.conf | ||
5 | |||
6 | [nat] | ||
7 | BEHIND_NAT = YES | ||
8 | ENABLE_NAT_SERVER = YES | ||
9 | DISABLEV6 = YES | ||
10 | |||
11 | [transport-http] | ||
12 | PORT = 0 | ||
13 | USE_IPv6 = YES | ||
14 | USE_IPv4 = YES | ||
15 | DISABLEV6 = NO | ||
16 | #BINDTO = 127.0.0.1 | ||
17 | #BINDTO6 = ::1 | ||
18 | |||
19 | [arm] | ||
20 | PORT = 12085 | ||
21 | DEFAULTSERVICES = transport | ||
22 | UNIXPATH = /tmp/gnunet-p1-service-arm.sock | ||
23 | |||
24 | [statistics] | ||
25 | PORT = 12084 | ||
26 | UNIXPATH = /tmp/gnunet-p1-service-statistics.sock | ||
27 | |||
28 | [resolver] | ||
29 | PORT = 12083 | ||
30 | UNIXPATH = /tmp/gnunet-p1-service-resolver.sock | ||
31 | |||
32 | [peerinfo] | ||
33 | PORT = 12082 | ||
34 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | ||
35 | |||
36 | [transport] | ||
37 | #DEBUG = YES | ||
38 | PORT = 12081 | ||
39 | PLUGINS = http | ||
40 | #BINARY = .libs/gnunet-service-transport | ||
41 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | ||
42 | #PREFIX = valgrind --leak-check=full | ||
43 | #PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args | ||
44 | |||
diff --git a/src/transport/test_transport_api_reliability_http_nat_peer2.conf b/src/transport/test_transport_api_reliability_http_nat_peer2.conf new file mode 100644 index 000000000..d754457bc --- /dev/null +++ b/src/transport/test_transport_api_reliability_http_nat_peer2.conf | |||
@@ -0,0 +1,38 @@ | |||
1 | @INLINE@ test_transport_defaults.conf | ||
2 | [PATHS] | ||
3 | SERVICEHOME = /tmp/test-transport/api-http-p2/ | ||
4 | DEFAULTCONFIG = test_transport_api_http_nat_peer2.conf | ||
5 | |||
6 | [nat] | ||
7 | DISABLEV6 = NO | ||
8 | |||
9 | [transport-http] | ||
10 | PORT = 12090 | ||
11 | USE_IPv6 = YES | ||
12 | USE_IPv4 = YES | ||
13 | DISABLEV6 = NO | ||
14 | #BINDTO = 127.0.0.1 | ||
15 | |||
16 | [arm] | ||
17 | PORT = 12095 | ||
18 | DEFAULTSERVICES = transport | ||
19 | UNIXPATH = /tmp/gnunet-p2-service-arm.sock | ||
20 | |||
21 | [statistics] | ||
22 | PORT = 12094 | ||
23 | UNIXPATH = /tmp/gnunet-p2-service-statistics.sock | ||
24 | |||
25 | [resolver] | ||
26 | PORT = 12093 | ||
27 | UNIXPATH = /tmp/gnunet-p2-service-resolver.sock | ||
28 | |||
29 | [peerinfo] | ||
30 | PORT = 12092 | ||
31 | UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | ||
32 | |||
33 | [transport] | ||
34 | #DEBUG = YES | ||
35 | PORT = 12091 | ||
36 | PLUGINS = http | ||
37 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | ||
38 | #PREFIX = valgrind --leak-check=full | ||
diff --git a/src/transport/test_transport_api_reliability_https_nat_peer1.conf b/src/transport/test_transport_api_reliability_https_nat_peer1.conf new file mode 100644 index 000000000..6c87aeed4 --- /dev/null +++ b/src/transport/test_transport_api_reliability_https_nat_peer1.conf | |||
@@ -0,0 +1,40 @@ | |||
1 | @INLINE@ test_transport_defaults.conf | ||
2 | [PATHS] | ||
3 | SERVICEHOME = /tmp/test-transport/api-https-p1/ | ||
4 | DEFAULTCONFIG = test_transport_api_https_nat_peer1.conf | ||
5 | |||
6 | [nat] | ||
7 | BEHIND_NAT = YES | ||
8 | ENABLE_NAT_SERVER = YES | ||
9 | DISABLEV6 = YES | ||
10 | |||
11 | [transport-https] | ||
12 | PORT = 0 | ||
13 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | ||
14 | KEY_FILE = $SERVICEHOME/https_key_p1.key | ||
15 | CERT_FILE = $SERVICEHOME/https_cert_p1.crt | ||
16 | USE_IPv6 = YES | ||
17 | USE_IPv4 = YES | ||
18 | |||
19 | [arm] | ||
20 | PORT = 12105 | ||
21 | |||
22 | [statistics] | ||
23 | PORT = 12104 | ||
24 | UNIXPATH = /tmp/gnunet-p1-service-statistics.sock | ||
25 | |||
26 | [resolver] | ||
27 | PORT = 12103 | ||
28 | UNIXPATH = /tmp/gnunet-p1-service-resolver.sock | ||
29 | |||
30 | [peerinfo] | ||
31 | PORT = 12102 | ||
32 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | ||
33 | |||
34 | [transport] | ||
35 | PORT = 12101 | ||
36 | PLUGINS = https | ||
37 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | ||
38 | DEBUG = NO | ||
39 | |||
40 | |||
diff --git a/src/transport/test_transport_api_reliability_https_nat_peer2.conf b/src/transport/test_transport_api_reliability_https_nat_peer2.conf new file mode 100644 index 000000000..6833ba512 --- /dev/null +++ b/src/transport/test_transport_api_reliability_https_nat_peer2.conf | |||
@@ -0,0 +1,36 @@ | |||
1 | @INLINE@ test_transport_defaults.conf | ||
2 | [PATHS] | ||
3 | SERVICEHOME = /tmp/test-transport/api-https-p2/ | ||
4 | DEFAULTCONFIG = test_transport_api_https_nat_peer2.conf | ||
5 | |||
6 | [transport-https] | ||
7 | PORT = 12110 | ||
8 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | ||
9 | KEY_FILE = $SERVICEHOME/https_key_p2.key | ||
10 | CERT_FILE = $SERVICEHOME/https_cert_p2.crt | ||
11 | USE_IPv6 = YES | ||
12 | USE_IPv4 = YES | ||
13 | |||
14 | [arm] | ||
15 | PORT = 12115 | ||
16 | UNIXPATH = /tmp/gnunet-p2-service-arm.sock | ||
17 | |||
18 | [statistics] | ||
19 | PORT = 12114 | ||
20 | UNIXPATH = /tmp/gnunet-p2-service-statistics.sock | ||
21 | |||
22 | [resolver] | ||
23 | PORT = 12113 | ||
24 | UNIXPATH = /tmp/gnunet-p2-service-resolver.sock | ||
25 | |||
26 | [peerinfo] | ||
27 | PORT = 12112 | ||
28 | UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | ||
29 | |||
30 | [transport] | ||
31 | PORT = 12111 | ||
32 | PLUGINS = https | ||
33 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | ||
34 | DEBUG = NO | ||
35 | |||
36 | |||