Giter VIP home page Giter VIP logo

Comments (8)

nyxnor avatar nyxnor commented on June 15, 2024

Having two files with different names and same contents saved results in tor failing to parse the configuration.

[warn] Duplicate authorization for the same hidden service address [scrubbed].
[warn] Failed to parse/validate config: Failed to configure client authorization for hidden services. See logs for details.
[err] Reading config failed--see warnings above.

from onionjuggler.

nyxnor avatar nyxnor commented on June 15, 2024

improvements made:

  • avoid files with the same contents
  • avoid invalid files as much as possible, check lower case, upper case, numbering, protocol, semicolon delimiter etc.

from onionjuggler.

nyxnor avatar nyxnor commented on June 15, 2024

I inserted a wrong configuration file to ClientOnionAuthrDir missing the onion address at the beginning:

:descriptor:x25519:<priv-key-base32>

The tor parser does not inform this is the problem:

[err] tor_assertion_failed_(): Bug: ../src/app/config/config.c:920: get_options_mutable: Assertion global_options failed; aborting. (on Tor 0.4.7.8 )
[err] Bug: Tor 0.4.7.8: Assertion global_options failed in get_options_mutable at ../src/app/config/config.c:920: . Stack trace: (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(log_backtrace_impl+0x57) [0x5afccea3cf07] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(tor_assertion_failed_+0x148) [0x5afccea47f88] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(escaped_safe_str+0xa2) [0x5afcceaccc92] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(hs_parse_address+0x5c) [0x5afcceb46b0c] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(hs_config_client_authorization+0x120) [0x5afcceb44310] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(hs_config_client_auth_all+0x19) [0x5afcceb49899] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(+0x17cc1a) [0x5afccead4c1a] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(+0xca7ef) [0x5afccea227ef] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(config_validate+0x115) [0x5afccea246c5] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(+0x17a0f2) [0x5afccead20f2] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(options_init_from_string+0x133) [0x5afccead2383] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(options_init_from_torrc+0x47c) [0x5afccead2a9c] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(tor_init+0x217) [0x5afcce9bf3f7] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(tor_run_main+0x91) [0x5afcce9bfd31] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(tor_main+0x49) [0x5afcce9bc2d9] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(main+0x19) [0x5afcce9bbeb9] (on Tor 0.4.7.8 )
[err] Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f82404a9d0a] (on Tor 0.4.7.8 )
[err] Bug:     /usr/bin/tor(_start+0x2a) [0x5afcce9bbf0a] (on Tor 0.4.7.8 )

This is why it is important to first validate as much as possible the config before saving to be parsed by tor, and when possible, remove the file that was just inserted.

The --verify-config option did not caught the problem because it is using -f /usr/loca/etc/torrc.d/40_onionjuggler.conf, not /etc/tor/torrc.

This should be corrected on another issue, but anyway, auth option to remove file if tor fails to parse is still missing.

from onionjuggler.

nyxnor avatar nyxnor commented on June 15, 2024

from the above commits.

  • auth-client is almost ready, need to include options to manual page
  • auth-server is being prepared to be able to import files, then late also add opts to man pages

from onionjuggler.

nyxnor avatar nyxnor commented on June 15, 2024
Usage: onionjuggler-cli-auth-client [--option <ARGUMENT>]
Description: client side onion authorization
Complete options:
  --on [--client-priv-file <FILE>] [--replace-file]
                            import '.auth_private' file to ClientOnionAuthDir
  --on [--client <CLIENT>] [--onion <ONION>] [--client-priv-key <CLIENT_PRIV_KEY>] [--replace-file]
                            generate keys for client authorization, optionally add define client's private key

-auth-client is missing a complete configuration option for experts or for people that haven't saved the config to a file and don't want to separate then into --onion and --client-priv-key.

Option missing is --client-priv-config

from onionjuggler.

nyxnor avatar nyxnor commented on June 15, 2024

keeping this open until more tests are done

from onionjuggler.

nyxnor avatar nyxnor commented on June 15, 2024

actually, this can't be closed until the man pages are updated with the new options

from onionjuggler.

nyxnor avatar nyxnor commented on June 15, 2024
  • update onionjuggler-tui accordingly, it is mainly missing option to import key from file

c8c66b7

from onionjuggler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.