Closed rapiz1 closed 1 year ago
Good suggestion, nali's configuration file and ip database directory really need to be more standardized.
But I've been busy recently, if you can pull a request for this I would be very grateful.
For existing versions of nali, you can change the directory via the environment variable NALI_HOME.
This was modified in version v0.6.0
Thanks for your great work! I encountered this project when I was using skk's nail-cli and wanted to switch to geoip2. It's a good enhancement. However, I noted nali still uses the config directory in a way only legacy software does.
~/.nali
is a non-standard directory for configurations on Linux. The best practice is$XDG_CONFIG_HOME/nali
. The main drawback for non-standard configuration directory is that it messes up with users' home directory and is not easy to organize.To keep nali backward-compatible as well as conform with the XDG standards, I propose following solution:
$XDG_CONFIG_HOME/nali
as a config directory. When nali stars, it scans~/.nali
,$XDG_CONFIG_HOME/nali
for configs and use the first hit.$XDG_CONFIG_HOME/nali
with the default configuration.I understand nali works on multiple platforms besides Linux. I don't know much about other platforms and they may also have similar issues.