Disable unused ports/protocols.

Joe Westclark5 months ago

Now that the default.xml file is gone, is there another way to stop the server from listening on all the ports I don't use? I know I could firewall them, but I would prefer to not have those scores of sockets open on the server since I only use Osmand. Per earlier advice, I have commented out their entry keys in the default.xml file but that has been deprecated since 6.2.

Anton Tananaev5 months ago

Have you checked the documentation?

Joe Westclark5 months ago

doh! protocols.enable. Missed it. Thank you.

gustavofarias4 months ago

"Default configuration file is now removed to avoid confusion and misconfiguration"

For me it's absolutely the opposite. Previously I checked the default values in default.xml and changed the ones I wanted in traccar.xml. When I wanted a description I went to https://www.traccar.org/configuration-file/.

Now you just start a server without knowing what the defaults are, and basically has to read the entire https://www.traccar.org/configuration-file/ page to make some change.
Also, a correct configuration now depends on the correctness and updates made to this page: https://www.traccar.org/configuration-file/

Unless the devs keep the documentation updated to reflect the code, this will be a source of misconfiguration. The copy and paste of parameters from docs to traccar.xml is not only tedious but very error prone, since one is just text the other is XML.

gustavofarias4 months ago

Now it's more difficult for users to discover new parameters. Because now you must read an entire confusing doc page. Before you could spot new parameters just looking at the XML or comparing with diff.

Anton Tananaev4 months ago

In case you're not aware, we have a script to sync the configuration doc. We run it during release, so the documentation page is guaranteed to be correct for the latest official release.

You can also check the source code diff if you want to see the differences between versions. Not very different from XML diff.

gustavofarias4 months ago

How could me or anyone be aware of that?

protocols.enable config
List of protocols to enable. If not specified, Traccar enabled all protocols that have port numbers listed. The value is a comma-separated list of protocol names. Example value: teltonika,osmand

So, with a fresh installation of traccar no protocols are enabled by default, right?

Anton Tananaev4 months ago

The script is part of the open source repo. And I'm pretty sure I mentioned this information somewhere in the past.