[client]
HOME = $SERVICEHOME
-[transport-tcp]
-# Use 0 to ONLY advertise as a peer behind NAT (no port binding)
-PORT = 2086
-ADVERTISED_PORT = 2086
-
+[nat]
# Are we behind NAT?
BEHIND_NAT = YES
# (but use different: this one restricts our bind!)
# BINDTO =
+# Disable IPv6 support
+DISABLEV6 = NO
+
+
+[transport-tcp]
+# Use 0 to ONLY advertise as a peer behind NAT (no port binding)
+PORT = 2086
+ADVERTISED_PORT = 2086
+
TIMEOUT = 300000
-# Disable IPv6 support
-# DISABLEV6 =
+# Allow use of loopback address
+USE_LOCALADDR = NO
+
# ACCEPT_FROM =
# ACCEPT_FROM6 =
# REJECT_FROM =
# REJECT_FROM6 =
+
[transport-udp]
PORT = 2086
-# BEHIND_NAT =
-# BINDTO =
-# ALLOW_NAT =
-# ONLY_NAT_ADDRESSES =
-# INTERNAL_ADDRESS =
-# EXTERNAL_ADDRESS =
+
+# Allow use of loopback address
+USE_LOCALADDR = NO
+
[transport-http]
PORT = 1080
+# Allow use of loopback address
+USE_LOCALADDR = NO
+
[transport-https]
PORT = 4433
+# Allow use of loopback address
+USE_LOCALADDR = NO
+
[transport-wlan]
# Name of the interface in monitor mode (typically monX)
case AF_INET6:
if ( (IN6_IS_ADDR_LINKLOCAL (&((struct sockaddr_in6 *) addr)->sin6_addr)) ||
(GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno(plugin->env->cfg,
- "transport-tcp",
+ "nat",
"DISABLEV6")) )
{
/* skip link local addresses */
struct GNUNET_TIME_Relative idle_timeout;
behind_nat = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-tcp",
+ "nat",
"BEHIND_NAT");
nat_punched = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-tcp",
+ "nat",
"NAT_PUNCHED");
enable_nat_client = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-tcp",
+ "nat",
"ENABLE_NAT_CLIENT");
enable_nat_server = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-tcp",
+ "nat",
"ENABLE_NAT_SERVER");
enable_upnp = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-tcp",
+ "nat",
"ENABLE_UPNP");
if ( (GNUNET_YES == enable_nat_server) &&
external_address = NULL;
if (GNUNET_OK ==
GNUNET_CONFIGURATION_have_value (env->cfg,
- "transport-tcp",
+ "nat",
"EXTERNAL_ADDRESS"))
{
(void) GNUNET_CONFIGURATION_get_value_string (env->cfg,
- "transport-tcp",
+ "nat",
"EXTERNAL_ADDRESS",
&external_address);
}
bind_address = NULL;
if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg,
- "transport-tcp",
+ "nat",
"BINDTO",
&bind_address))
{
internal_address = NULL;
if (GNUNET_OK ==
GNUNET_CONFIGURATION_have_value (env->cfg,
- "transport-tcp",
+ "nat",
"INTERNAL_ADDRESS"))
{
(void) GNUNET_CONFIGURATION_get_value_string (env->cfg,
- "transport-tcp",
+ "nat",
"INTERNAL_ADDRESS",
&internal_address);
}
return NULL;
}
- use_localaddresses = GNUNET_NO;
- if (GNUNET_CONFIGURATION_have_value (env->cfg,
- "transport-tcp", "USE_LOCALADDR"))
- {
- use_localaddresses = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-tcp",
- "USE_LOCALADDR");
- }
+ use_localaddresses = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
+ "transport-tcp",
+ "USE_LOCALADDR");
+ if (use_localaddresses == GNUNET_SYSERR)
+ use_localaddresses = GNUNET_NO;
if (aport == 0)
aport = bport;
}
if ( (GNUNET_YES !=
- GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg, "transport-udp",
+ GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg, "nat",
"DISABLEV6")))
{
plugin->udp_sockv6.desc = GNUNET_NETWORK_socket_create (PF_INET6, SOCK_DGRAM, 0);
struct IPv4UdpAddress v4_address;
if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-udp",
- "BEHIND_NAT"))
+ "nat",
+ "BEHIND_NAT"))
{
/* We are behind nat (according to the user) */
if (check_gnunet_nat_binary("gnunet-nat-server") == GNUNET_YES)
behind_nat = GNUNET_NO; /* We are not behind nat! */
if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-udp",
- "ALLOW_NAT"))
+ "nat",
+ "ALLOW_NAT"))
{
if (check_gnunet_nat_binary("gnunet-nat-client") == GNUNET_YES)
allow_nat = GNUNET_YES; /* We will try to connect to NAT'd peers */
allow_nat = GNUNET_NO; /* We don't want to try to help NAT'd peers */
if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-udp",
- "ONLY_NAT_ADDRESSES"))
+ "nat",
+ "ONLY_NAT_ADDRESSES"))
only_nat_addresses = GNUNET_YES; /* We will only report our addresses as NAT'd */
else
only_nat_addresses = GNUNET_NO; /* We will report our addresses as NAT'd and non-NAT'd */
external_address = NULL;
if (((GNUNET_YES == behind_nat) || (GNUNET_YES == allow_nat)) && (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (env->cfg,
- "transport-udp",
+ "nat",
"EXTERNAL_ADDRESS",
&external_address)))
{
internal_address = NULL;
if ((GNUNET_YES == behind_nat) && (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (env->cfg,
- "transport-udp",
+ "nat",
"INTERNAL_ADDRESS",
&internal_address)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Require INTERNAL_ADDRESS for service `%s' in configuration!\n"),
- "transport-udp");
+ _("Require INTERNAL_ADDRESS for service `%s' in configuration!\n"),
+ "transport-udp");
GNUNET_free_non_null(external_address);
return NULL;
}
"transport-udp", "USE_LOCALADDR"))
{
use_localaddresses = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
- "transport-udp",
- "USE_LOCALADDR");
+ "transport-udp",
+ "USE_LOCALADDR");
}
plugin = GNUNET_malloc (sizeof (struct Plugin));
PORT = 4094
[transport-tcp]
-DISABLEV6 = YES
TIMEOUT = 300000
PORT = 4094
+USE_LOCALADDR = YES
+
+[nat]
+DISABLEV6 = YES
BINDTO = 127.0.0.1
ENABLE_UPNP = NO
BEHIND_NAT = NO
ALLOW_NAT = NO
INTERNAL_ADDRESS = 127.0.0.1
EXTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[transport]
plugins = tcp
PORT = 3094
[transport-tcp]
-DISABLEV6 = YES
TIMEOUT = 300000
PORT = 3094
+USE_LOCALADDR = YES
+
+[nat]
+DISABLEV6 = YES
BINDTO = 127.0.0.1
ENABLE_UPNP = NO
BEHIND_NAT = NO
ALLOW_NAT = NO
INTERNAL_ADDRESS = 127.0.0.1
EXTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[fs]
AUTOSTART = NO
[transport-tcp]
-DISABLEV6 = YES
PORT = 30001
BINDTO = 127.0.0.1
+USE_LOCALADDR = YES
+
+[nat]
+DISABLEV6 = YES
BEHIND_NAT = NO
ALLOW_NAT = NO
ENABLE_UPNP = NO
INTERNAL_ADDRESS = 127.0.0.1
EXTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[transport-udp]
PORT = 30001
[transport-tcp]
-DISABLEV6 = YES
PORT = 40001
+USE_LOCALADDR = YES
+
+[nat]
BINDTO = 127.0.0.1
+DISABLEV6 = YES
BEHIND_NAT = NO
ALLOW_NAT = NO
ENABLE_UPNP = NO
EXTERNAL_ADDRESS = 127.0.0.1
INTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[transport-udp]
PORT = 40002
[transport-tcp]
-DISABLEV6 = YES
PORT = 12368
+USE_LOCALADDR = YES
+
+[nat]
+DISABLEV6 = YES
BINDTO = 127.0.0.1
BEHIND_NAT = YES
ENABLE_NAT_SERVER = YES
#NAT_PUNCHED = YES
INTERNAL_ADDRESS = 127.0.0.1
EXTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[fs]
AUTOSTART = NO
[transport-tcp]
-DISABLEV6 = YES
PORT = 23000
+USE_LOCALADDR = YES
+
+[nat]
BINDTO = 127.0.0.1
+DISABLEV6 = YES
BEHIND_NAT = NO
ENABLE_NAT_CLIENT = YES
EXTERNAL_ADDRESS = 127.0.0.1
INTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[core]
AUTOSTART = NO
[transport-tcp]
-DISABLEV6 = YES
+USE_LOCALADDR = YES
PORT = 12368
+
+[nat]
+DISABLEV6 = YES
BINDTO = 127.0.0.1
BEHIND_NAT = NO
#ALLOW_NAT = NO
ENABLE_UPNP = NO
INTERNAL_ADDRESS = 127.0.0.1
EXTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[fs]
AUTOSTART = NO
[transport-tcp]
-DISABLEV6 = YES
PORT = 0
+USE_LOCALADDR = YES
+
+[nat]
+DISABLEV6 = YES
BINDTO = 127.0.0.1
BEHIND_NAT = NO
#ALLOW_NAT = NO
ENABLE_UPNP = NO
EXTERNAL_ADDRESS = 127.0.0.1
INTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[core]
AUTOSTART = NO
[transport-udp]
PORT = 12368
+USE_LOCALADDR = YES
+
+[nat]
BEHIND_NAT = YES
BINDTO = 127.0.0.1
ALLOW_NAT = NO
ONLY_NAT_ADDRESSES = YES
INTERNAL_ADDRESS = 127.0.0.1
EXTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[fs]
AUTOSTART = NO
[transport-udp]
PORT = 22368
+USE_LOCALADDR = YES
+
+[nat]
BINDTO = 127.0.0.1
BEHIND_NAT = NO
ALLOW_NAT = YES
EXTERNAL_ADDRESS = 127.0.0.1
INTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[fs]
AUTOSTART = NO
[statistics]
PORT = 2567
-[transport-tcp]
-#DEBUG=YES
+
+[nat]
DISABLEV6 = YES
BINDTO = 127.0.0.1
BEHIND_NAT = NO
PORT = 2567
[transport-tcp]
-#DEBUG=YES
-DISABLEV4 = YES
USE_LOCALADDR = YES
+[nat]
BINDTO = 127.0.0.1
#BEHIND_NAT = NO
#ALLOW_NAT = NO
PORT = 2567
[transport-tcp]
-#DEBUG=YES
+USE_LOCALADDR = YES
+
+[nat]
DISABLEV6 = YES
BINDTO = 127.0.0.1
BEHIND_NAT = NO
ENABLE_UPNP = NO
EXTERNAL_ADDRESS = 127.0.0.1
INTERNAL_ADDRESS = 127.0.0.1
-USE_LOCALADDR = YES
[transport-unix]
PORT = 2572