I2P Address: [http://git.idk.i2p]

Skip to content

Bulk Configuration File Editor, expose function allowing developers to determine default directory

idk requested to merge idk/i2p.i2p:bulk-config-editor into master

This makes it possible to use WorkingDir.java to retrieve the default working configuration directory without a working router context. note that this is for retrieving the default directory, and may not reflect the directory in use by a running router. It is useful in cases where an external, command-line application needs to know a sane default configuration directory without a router or a context.

It then uses this functionality to add a bulk configuration editing tool, which makes it possible to make changes to every line in a configuration file or configuration directory which matches a regular expression so that it contains a value. This is to ease integration with systems that make use of virtual interfaces and networks to provide isolation from the host system and it's network interfaces, such as Docker and QubesOS. These systems may listen virtually on hosts other than 127.0.0.1 and/or localhost, may need to change default ports, and possibly make other bulk changes to the defaults before I2P is suitable to operate on their systems.

It has been tested, and is fairly easy to test because it is strictly a command-line tool. It's impact should be limited on the rest of the software. It is usable in it's present form.

I was unsure of what to do about logging. I know to use our built-in logger for most things, but as this is intentionally not running as part of the router and may be run when the router is not running, and even inherits from WorkingDir which sets the log directory, I think that may cause problems? I had a look at some of the other command-line apps for clues and many of them seem to use System.out.println as well. @zzz I'd love to hear your thoughts on this when you have a moment.

Merge request reports

Loading