What is anti-leech protection?
As a webmaster hosting many downloadable files on your website, you may hope users click download links directly from your home page, so they will see those advertisements on your home page before downloading. But you may face the problem that someone copies your file links and puts them on his website, which could incur many unwanted downloads to your website. This could steal all the bandwidth of your site. With the help of anti-leech protection, you can prevent this behavior and save your bandwidth.
How does anti-leech protection in the Xlight FTP Server work?
Xlight FTP provides a new mechanism for anti-leech protection, where it can automatically add a random path part before all FTP links. For example, if your original FTP link is "/public/download/test.txt", after anti-leech protection the link will become "/xxxx/public/download/test.txt", where "xxxx" is the random path part added by Xlight FTP Server. Xlight can be configured to change "xxxx" periodically, so the whole download link "/xxxx/public/download/test.txt" will change also. Without knowing what is the top path "xxxx", the leecher can not download anything from the anti-leech-protected FTP server.In the xferlog of the Xlight FTP Server, the part of the random anti-leech path is removed, so anti-leech protection won't have an impact on the result of the FTP server's download statistics.
How to update website download links when the anti-leech path is changed in the Xlight FTP Server?
Whenever the anti-leech random path changes, Xlight FTP Server can either output the changed random path part "xxxx" to a file or execute an external program and pass the random path part "xxxx" as the first argument to the external program. With the help of these two methods, you can use your CGI scripts or programs to update the download links on your websites.How to protect the transition period between the time the anti-leech path changed in the FTP server and the website updated its download links?
There could be some delay between the time the FTP server changed its anti-leech random path and the website finally updated its download links with the new path. If a user clicks the download link during this transition period, he may go to the old link, which it already become an invalid path in the FTP server. There is an option in the Xlight FTP Server, where you can set up a protection period. During this protection period, both old and new links will work in the FTP server, so users won't experience invalid link problems during this transition period.