rejetto forum

HFS Only one User Agent can Download

ALEX · 3 · 4551

0 Members and 2 Guests are viewing this topic.

Offline ALEX

  • Occasional poster
  • *
    • Posts: 15
    • View Profile
Hello. can somehow configure the program so that only one specific agent can load ?

Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 843
  • Status: On hiatus (sporadically here)
    • View Profile
Welcome! :)

It's easy, just press "Alt+F6" inside HFS. That will create and open a text file ( There add the following:


Replace the text marked in red (ALLOWED_USER_AGENT_NAME), by the user agent you want to allow access, for example, if you only want to allow "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0", you would use this:

Code: [Select]
{.if|{.{.header|User-Agent.}!=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0.}|{:{.disconnect.}:}.}

Replace the text marked in green (request), by "download", if you want to allow file listing (to anyone), but block downloads that doesn't match the specified user agent.

HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.