aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-07 13:05:27 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-07 13:05:27 +0100
commitfe7e93cbcc20631e611c1a5505a03d00e73e0cc2 (patch)
tree661a57b75982f22041bd15d300a439bcce097a37 /src
parent76b387ae68024934ccd92daa34659ada17dc3955 (diff)
downloadgnunet-fe7e93cbcc20631e611c1a5505a03d00e73e0cc2.tar.gz
gnunet-fe7e93cbcc20631e611c1a5505a03d00e73e0cc2.zip
fixing uninit sin_addr; now successfully tested external hole punching support in new NAT code; documenting options to be used in the future
Diffstat (limited to 'src')
-rw-r--r--src/nat/gnunet-service-nat.c2
-rw-r--r--src/transport/transport.conf.in40
2 files changed, 39 insertions, 3 deletions
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index a8a824b48..b3e81127b 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -28,7 +28,6 @@
28 * knowledge about the local network topology. 28 * knowledge about the local network topology.
29 * 29 *
30 * TODO: 30 * TODO:
31 * - test manual hole punching support
32 * - adapt existing transports to use new NAT logic 31 * - adapt existing transports to use new NAT logic
33 * - abandon legacy NAT code 32 * - abandon legacy NAT code
34 * 33 *
@@ -863,6 +862,7 @@ notify_client_external_ipv4_change (void *cls,
863 s4 = (struct sockaddr_in *) &lal.addr; 862 s4 = (struct sockaddr_in *) &lal.addr;
864 s4->sin_family = AF_INET; 863 s4->sin_family = AF_INET;
865 s4->sin_port = htons (ch->ext_dns_port); 864 s4->sin_port = htons (ch->ext_dns_port);
865 s4->sin_addr = *v4;
866 lal.af = AF_INET; 866 lal.af = AF_INET;
867 lal.ac = GNUNET_NAT_AC_GLOBAL | GNUNET_NAT_AC_MANUAL; 867 lal.ac = GNUNET_NAT_AC_GLOBAL | GNUNET_NAT_AC_MANUAL;
868 check_notify_client (&lal, 868 check_notify_client (&lal,
diff --git a/src/transport/transport.conf.in b/src/transport/transport.conf.in
index 4e9f17f77..7b5413bbe 100644
--- a/src/transport/transport.conf.in
+++ b/src/transport/transport.conf.in
@@ -38,7 +38,17 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
38[transport-tcp] 38[transport-tcp]
39# Use 0 to ONLY advertise as a peer behind NAT (no port binding) 39# Use 0 to ONLY advertise as a peer behind NAT (no port binding)
40PORT = 2086 40PORT = 2086
41
42# Obsolete option, to be replaced by HOLE_EXTERNAL (soon)
41ADVERTISED_PORT = 2086 43ADVERTISED_PORT = 2086
44
45# If we have a manually punched NAT, what is the external IP and port?
46# Can use DNS names for DynDNS-based detection of external IP.
47# Can use IPv6 addresses ([fefc::]:PORT).
48# Use "AUTO" for the hostname to automatically detect external IP.
49# Do not set if NAT is not manually punched.
50# HOLE_EXTERNAL = AUTO:2086
51
42TESTING_IGNORE_KEYS = ACCEPT_FROM; 52TESTING_IGNORE_KEYS = ACCEPT_FROM;
43 53
44# Maximum number of open TCP connections allowed 54# Maximum number of open TCP connections allowed
@@ -72,8 +82,13 @@ BROADCAST_INTERVAL = 30 s
72MAX_BPS = 1000000 82MAX_BPS = 1000000
73TESTING_IGNORE_KEYS = ACCEPT_FROM; 83TESTING_IGNORE_KEYS = ACCEPT_FROM;
74 84
75# Configuration for manually punched holes in NAT. 85# If we have a manually punched NAT, what is the external IP and port?
76# HOLE_EXTERNAL = auto:2086 86# Can use DNS names for DynDNS-based detection of external IP.
87# Can use IPv6 addresses ([fefc::]:PORT).
88# Use "AUTO" for the hostname to automatically detect external IP.
89# Do not set if NAT is not manually punched.
90# HOLE_EXTERNAL = AUTO:2086
91
77 92
78[transport-http_client] 93[transport-http_client]
79MAX_CONNECTIONS = 128 94MAX_CONNECTIONS = 128
@@ -98,7 +113,18 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
98[transport-http_server] 113[transport-http_server]
99#EXTERNAL_HOSTNAME = <your hostname/path> 114#EXTERNAL_HOSTNAME = <your hostname/path>
100PORT = 1080 115PORT = 1080
116
117# Obsolete option, to be replaced by HOLE_EXTERNAL (soon)
101ADVERTISED_PORT = 1080 118ADVERTISED_PORT = 1080
119
120# If we have a manually punched NAT, what is the external IP and port?
121# Can use DNS names for DynDNS-based detection of external IP.
122# Can use IPv6 addresses ([fefc::]:PORT).
123# Use "AUTO" for the hostname to automatically detect external IP.
124# Do not set if NAT is not manually punched.
125# HOLE_EXTERNAL = AUTO:2086
126
127
102MAX_CONNECTIONS = 128 128MAX_CONNECTIONS = 128
103TESTING_IGNORE_KEYS = ACCEPT_FROM; 129TESTING_IGNORE_KEYS = ACCEPT_FROM;
104 130
@@ -139,7 +165,17 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
139# Does the external hostname use the same port? 165# Does the external hostname use the same port?
140# EXTERNAL_HOSTNAME_USE_PORT = YES 166# EXTERNAL_HOSTNAME_USE_PORT = YES
141PORT = 4433 167PORT = 4433
168
169# Obsolete option, to be replaced by HOLE_EXTERNAL (soon)
142ADVERTISED_PORT = 4433 170ADVERTISED_PORT = 4433
171
172# If we have a manually punched NAT, what is the external IP and port?
173# Can use DNS names for DynDNS-based detection of external IP.
174# Can use IPv6 addresses ([fefc::]:PORT).
175# Use "AUTO" for the hostname to automatically detect external IP.
176# Do not set if NAT is not manually punched.
177# HOLE_EXTERNAL = AUTO:2086
178
143CRYPTO_INIT = NORMAL 179CRYPTO_INIT = NORMAL
144KEY_FILE = $GNUNET_DATA_HOME/transport/https.key 180KEY_FILE = $GNUNET_DATA_HOME/transport/https.key
145CERT_FILE = $GNUNET_DATA_HOME/transport/https.cert 181CERT_FILE = $GNUNET_DATA_HOME/transport/https.cert