JTSDNS - TSDNS alternative with MySQL

Started by Stefan1200, June 14, 2014, 08:55:48 AM

Previous topic - Next topic

Stefan1200

-= Information =-
This is an TSDNS alternative using MySQL as database. In addition to this it also saves to database how often a hostname was requested and the last requested time. Just import the jtsdns.sql to your MySQL database and, if you want, create your own website that adds or edit the entries in that JTSDNS table. The names of the columns are quite self explaining. Like the real TSDNS application wildcards at hostnames are supported.

It can still have bugs, but one user use it already on a server without problems. For more information about the usage, just look in the readme.txt.


-= System requirements =-
This program runs on Windows and Linux (even without X server). On Mac OS X 10.4+ it should run too, but it is not tested.
Please send me a message if this bot runs on Mac OS X without problems.
All you need is a Java SE runtime environment version 5 or newer.
You can get the latest version from www.java.com or http://www.oracle.com/technetwork/java/javase/downloads/index.html
Mac OS X 10.4 or newer users should have it already installed.
FreeBSD Users should look at http://www.freebsd.org/java/ to learn more about Java on FreeBSD.
Linux users should install the package openjdk-8-jre-headless / java-1.8.0-openjdk-headless.
On older linux you can also use sun-java5-jre, sun-java6-jre, openjdk-7-jre or java-1.7.0-openjdk.
An example on Debian or Ubuntu: apt-get install openjdk-8-jre-headless
An example on CentOS or Fedora -21: yum install java-1.8.0-openjdk-headless
An example on Fedora 22+: dnf install java-1.8.0-openjdk-headless
An example on OpenSUSE: zypper install java-1_8_0-openjdk-headless
The package gcj-jre (GNU Java) will not work!

Maybe you want to limit the maximum ram that this program use. This can be useful on a virtual server.
You can do this by using java command line arguments for the java virtual machine.
If you want to use 30 MB ram as maximum, you can start JTSDNS like this:
java -mx30M -jar JTSDNS.jar
Notice: If you choose a to low value, JTSDNS may not run or is not stable. I did no long time tests on this.


-= Documentation =-
Readme file and changelog - readme.txt


-= Download =-
Latest final version: download

Stefan1200

New version of JTSDNS with logfile writing support and an updated documentation.

Stefan1200

Version 1.1 Final (16.06.2014) - Updated release on 12.09.2014
Small update, made MySQL table column hostname unique. Should give you a performance boost on big JTSDNS tables.
Update your existing table using the following MySQL command:

ALTER TABLE `jtsdns` ADD UNIQUE (`hostname`)

Stefan1200

New release:

QuoteVersion 1.2 Final (26.10.2015)
+ New way to create a Windows Service of the JTSDNS. Now it is possible to stop the bot by stopping the service.
  This new way is also compatible with Windows 10 (and should be also compatible with Windows 8, 8.1, Server 2012 and 2012 R2).
  Check out the tools directory! Thanks to the team behind the tool procrun from Apache Commons!
o Logfile path value can contain the variable %apphome% now which will be replaced with the environment variable app.home.
  app.home will be set while starting the JTSDNS as a Windows service created by my script.
  But you can also set this app.home variable while adding the argument -Dapp.home=PATH_TO_JTSDNS while starting the JTSDNS.
  If no app.home environment variable exists, it will be replaced with an empty string.
o Recreated JTSDNS Windows executables with the current version of Launch4j (because of bugfixes).
o Updated MySQL Connector/J to version 5.1.36.

Stefan1200

New release:

QuoteVersion 1.3 Final (28.08.2016)
+ Added optional MySQL Connector settings to the config file (settings about compression and encryption of the MySQL connections).
- Bugfix: JTSDNS is now compatible with the new Teamspeak version 3.1. (thx to BigBear)
o JTSDNS version will be printed to log file after starting JTSDNS.
o Updated MySQL Connector/J to version 5.1.39.

Stefan1200

New release:

QuoteVersion 1.4 Final (06.12.2016)
+ Added experimental IPv6 compatibility for TS3 client version 3.1. Please report errors to me.
+ Added hostname resolving, because the TS3 client version 3.1 only accept IP addresses.
  JTSDNS will allow using hostnames of TS3 servers, but will do a DNS resolve just before sending it to the TS3 client.
  Using this way you can continue using dynamic DNS addresses at the TSDNS service with the new TS3 client.
o Updated MySQL Connector/J to version 5.1.40.

Stefan1200

New release:

QuoteVersion 1.4.1 Final (11.12.2016)
- Bugfix: Don't try to resolve hostname, if no entry was found in the database.

Stefan1200

New release:

QuoteVersion 1.5.0 Final (30.07.2017)
! Complete recreation of the database query stuff.
  Now only one connection will be used for all requests. This connection keeps connected to the MySQL server.
  Expect a big increase in performance in an environment with many requests per minute.
  The new code should also help to lower the memory requirements, especally in big environments.
+ JTSDNS now try to stop the database and the server socket connection on a friendly way,
  if a task stop request (SIGTERM) will be received (e.g. by CTRL + c).
- Bugfix: The Windows service scripts from the tools directory was not working, if only a 64 bit Java Runtime is installed.
          Created two new scripts, which have to be used, if no 32 bit Java Runtime is installed.
o Updated MySQL Connector/J to version 5.1.42.

Stefan1200

New release:

QuoteVersion 1.5.1 Final (27.08.2017)
- Bugfix: Shorter IPv6 addresses will now detected right. But still not all legal notations of IPv6 addresses will be detected right.
          If you have problems while using IPv6, only use one of this notations:
          [1234::89]
          [1234:abc:56:de::89]
          [1234:abc:56:de:0:0:0:89]
          JTSDNS 1.4, 1.4.1 and 1.5.0 only detect the long written notation: [1234:abc:56:de:0:0:0:89]
o Updated the exe files for Windows, created with the newest version of Launch4j.

Stefan1200

New release:

QuoteVersion 1.5.2 (28.08.2017)
- Bugfix: If you use IPv4 and IPv6 at a hostname at the same time,
          the JTSDNS forgot to seperate both entries with a comma for the TS3 client. (thx to Evilblood)
          It is still allowed to seperate both entries with a space in the database,
          but the JTSDNS will now send both seperated with a comma to the TS3 client.

Stefan1200

New release:

QuoteVersion 1.6.0 (31.03.2018)
+ Added support for NORESPONSE keyword from original TSDNS service. (thx to Evilblood for reporting this missing feature)
- Bugfix: If TSDNS hostname resolve to a DNS hostname, which itself resolves to IPv6, the brackets was not set correctly.
o Updated MySQL Connector/J to version 5.1.46.

Attention: This version was not tested in a real environment.