tsdns2

0.0.4 • Public • Published

tsdns2

Yet another NodeJS FOSS version of the TSDNS binary

Features

  • Supports the offical TSDNS Binary's config format
  • Watches the config file for changes
  • Logs requests and responses (using pino)
  • Supports older TS3 clients too

Usage

Options:
  --help          Show help                                            [boolean]
  --version       Show version number                                  [boolean]
  --config, -c    Path to TSDNS config file      [default: "tsdns_settings.ini"]
  --no-watch, -n  Disable watching
  --port, -p      Port to listen on                    [number] [default: 41144]
  --host, -h      Host to listen on                         [default: "0.0.0.0"]

Config format explanation

From offical tsdns_settings.ini.sample

#   ***This is the configuration file for the TSDNS server***
#
# The format is always "ident=value", where:
# ident is a host-name, which should at least for the right hand side be a
# valid (DNS) host-name.
# On a box known via DNS as "myrootserver.com" sensible idents might be
# "myrootserver.com" or "any.combination.of.weird.words.myrootserver.com".
# Also allowed is "*" as first character of an ident, which matches any
# queries that end with what follows the star. For example "*" matches
# always, providing a default answer. "*.myserver.eu" matches every query
# that ends with ".myserver.eu", like "foo.myserver.eu".
#
# The value side is always an IP address followed by a ':' and then either a
# port or the special string "$PORT".
#
# Also allowed as value is the special string "NORESPONSE", which makes the
# TSDNS server answer not answer this query. This can be useful in scenarios
# where multiple TSDNS servers exist and you wish to let "the other" TSDNS
# server handle this request. Or you wish regular domain resolving to take
# place for some cases.
#
# Example: The TSDNS server runs on on a box reachable as both as
# "teamspeak.com" and as "teamspeak-systems.de"
# So we might configure:
# public.teamspeak.com=12.13.14.15:10000
# test.teamspeak.com=12.13.14.15:12000
# private.teamspeak.com=12.13.14.15:14000
# voice.teamspeak.com=NORESPONSE
# *.teamspeak-systems.de=1.2.3.4:15000
# *=12.13.14.15:$PORT
#
# This way, now clients can connect to "test.teamspeak.com" to reach the test
# server, but if they still have the old "teamspeak.com:12000" in their
# bookmarks, it will also work thanks to the "*=12.13.14.15:$PORT" line, which
# acts as a backwards compatibility mechanism in this case, for everybody not
# using the new TSDNS names to connect.
#
# Starting server version 3.0.13 ipv6 values can also be specified. These are
# formated along the line of rfc2732 using [ and ] to encapsulate the address.
# For example the localhost port 9987 in ipv6 format would be [::1]:9987. Also
# starting 3.0.13, it is possible to specify a list of ip's on a line. An
# example would be to specify an ipv4 and ipv6 address, but multiple ipv4 and
# ipv6 addresses seperated by a space are allowed. Older clients that do not
# support ipv6 and multi value replies, will only recieve the first ipv4
# address on the line. For example:
# public2.teamspeak.com=[2001:0db8::1]:9987 1.2.3.4:9987 5.6.7.8:9987
# will only send 1.2.3.4:9987 to the older clients.
#
# Lines starting with "#" are ignored by the tsdns server, so to make any
# actual configuration you must remove the "#" infront.
#
# Note that if you want to use any non ascii characters you may do so,
# but you should make sure to store this configuration file as UTF8 encoded
# document.
#

Package Sidebar

Install

npm i tsdns2

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

7.55 kB

Total Files

4

Last publish

Collaborators

  • mkg20001