
If you do make it optional, I think it would be beneficial to document what its default value is if not set (in this case false).Īlso, I see that you're using your own RandomGenerator class for generating a long within a range.
Change the error condition maxUploadRate < 0L to maxUploadRate < 1L, as now it should be greater than 0.ĭespite what the documentation says, keepTorrentWithZeroLeechers is a required flag - omitting it crashes the program. In AppConfiguration's validate() method make minUploadRate and maxUploadRate optional if ghostSeed = true, and if ghostSeed = false or does not exist make minUploadRate and maxUploadRate required. Add another optional boolean configuration flag like ghostSeed, check if it is true in BandwidthDispatcher, and if so set the upload rate to 0. Method 2 (cleaner config file, but more work to implement): Change the error message for (maxUploadRate < 0L) to "maxUploadRate must be at least 0." (as it doesn't have to be greater than 0 now). In AppConfiguration modify the validate() method so that max upload only has to be strictly greater than min upload if both are not 0.
Add another if statement into BandwidthDispatcher, such that if the min and max upload rates both equal 0, the upload rate is set to 0. After looking through the source, I have a suggestion for how it could be implented: I requested in the old thread if you could add ghost-seeding (seeding without adding upload) to your program. Thanks for making this! I can move all my tracker-related stuff onto one Linux box.
This modification may not be copied, reproduced or published elsewhere without author's permission. For saying thanks to the author, please click here. If you like the project consider adding a star to the repository : (on the top-right). If you use Docker you will find two Dockerfile in the repository. You can download the latests release from Github. The server version will provide a multi-os experience with a safe WebUi to administrate your config from wherever you are. JOAL is focused in providing a simple user experience with multi-os support.
Don't get me wrong, i'm not saying JOAL is better than other tools around here.