dtn7 / dtn7-rs

Rust implementation of a DTN based on RFC 9171
Other
75 stars 20 forks source link

More robust node configuration processing #1

Closed mattbradbury closed 4 years ago

mattbradbury commented 4 years ago

Tweaked the dtnd -n parameter to take full dtn://example.com style input like the example in the -h

gh0st42 commented 4 years ago

Thank you for pointing at the difference between the documentation and code and directly making a PR!

When changing the command line parser one should also change the config file parser. In the future, this code should be refactored to use the same functions. Hoping for clap with config file support :)

Since it is very convenient to omit the address schemes and just derive them I kept this code in place if only alphanumeric input is provided. But if one provides a fully qualified address this is now also parsed correctly.

I just published a new version 0.9.6 that includes this feature and also supports this in the config parser.

I hope this fix is fine with you, thanks again for pointing at this! In general documentation and tutorials are still missing or a bit outdated.