Documentation > Other Configuration > Daemon Configuration Options
Daemon Configuration Options
Index
Introduction
joold
expects an optional file as program argument.
$ joold [/path/to/netsocket/config]
If omitted, the daemon will attempt to find an adjacent file named netsocket.json
and use that.
Only the network socket has available configuration as of now; the kernel socket is self-sufficient.
Network Socket Configuration File
This is a Json file that configures the daemon’s SS network socket. Here are two example of its contents:
{
"multicast address": "ff08::db8:64:64",
"multicast port": "6464",
"in interface": "eth0",
"out interface": "eth0",
"reuseaddr": 1,
"ttl": 3
}
{
"multicast address": "233.252.0.64",
"multicast port": "6464",
"in interface": "192.0.2.1",
"out interface": "192.0.2.1",
"reuseaddr": 1,
"ttl": 3
}
These are the options:
multicast address
- Type: String (IPv4/v6 address)
- Default: None (Field is mandatory)
Address the SS traffic will be sent to and listened from.
You do not want to hinder your future ability to add more NAT64s to the cluster, so it is strongly recommended that you input a multicast address here.
TODO I haven’t actually tested a unicast address in this field.
multicast port
- Type: String (port number or service name)
- Default: None (Field is mandatory)
TCP port where the SS traffic will be sent to and listened from.
in interface
- Type: String
- Default: NULL (kernel chooses an interface and address for you)
Address or interface to bind the socket in.
If multicast address
is IPv4, this should be one addresses from the interface where the SS traffic is expected to be received. If multicast address
is IPv6, this should be the name of the interface (eg. “eth0”).
Though they are optional, it is strongly recommended that you define both in interface
and out interface
to ensure the SS traffic does not leak through other interfaces.
out interface
- Type: String
- Default: NULL (kernel chooses an interface and address for you)
If multicast address
is IPv4, this should be one addresses from the interface where the multicast traffic is expected to be sent. If multicast address
is IPv6, this should be the name of the interface (eg. “eth0”).
Though they are optional, it is strongly recommended that you define both in interface
and out interface
to ensure the SS traffic does not leak through other interfaces.
reuseaddr
- Type: Integer
- Default: 0
Same as SO_REUSEADDR
. From man 7 socket
:
SO_REUSEADDR
Indicates that the rules used in validating addresses supplied
in a bind(2) call should allow reuse of local addresses. For
AF_INET sockets this means that a socket may bind, except when
there is an active listening socket bound to the address. When
the listening socket is bound to INADDR_ANY with a specific port
then it is not possible to bind to this port for any local
address. Argument is an integer boolean flag.
A rather more humane explanation can be found in Stack Overflow:
In other words, for multicast addresses `SO_REUSEADDR` behaves exactly
as `SO_REUSEPORT` for unicast addresses.
...
Basically, `SO_REUSEPORT` allows you to bind an arbitrary number of
sockets to exactly the same source address and port as long as all prior
bound sockets also had `SO_REUSEPORT` set before they were bound. If the
first socket that is bound to an address and port does not have
`SO_REUSEPORT` set, no other socket can be bound to exactly the same
address and port, regardless if this other socket has `SO_REUSEPORT` set
or not, until the first socket releases its binding again.
You do not want a hanging joold to prevent future joolds from having access to the SS traffic, so there is likely no reason to ever turn this value off. Unless you have a specific reason to change this, you should always include this value, and always override the default.
ttl
- Type: Integer
- Default: 1
Same as IP_MULTICAST_TTL
. From man 7 ip
:
IP_MULTICAST_TTL (since Linux 1.2)
Set or read the time-to-live value of outgoing multicast packets
for this socket. It is very important for multicast packets to
set the smallest TTL possible. The default is 1 which means that
multicast packets don't leave the local network unless the user
program explicitly requests it. Argument is an integer.