dperson / torproxy

GNU Affero General Public License v3.0
515 stars 144 forks source link

Configuration is broken if project name starts with "tor" and links are used #15

Closed iBobik closed 7 years ago

iBobik commented 7 years ago

If I use links between torproxy and another service it will expose env variables of linked service into torproxy container. It is not problem unless compose project name starts with "tor", because then there will be env variables TOR_* and this variables will be copied into /etc/tor/torrc.

Then tor will fail on broken config:

21. 5. 2017 1:35:36May 21 01:35:36.957 [notice] Tor 0.2.9.10 (git-e28303bcf90b842d) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.1.0e and Zlib 1.2.8.
21. 5. 2017 1:35:36May 21 01:35:36.960 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
21. 5. 2017 1:35:36May 21 01:35:36.961 [notice] Read configuration file "/etc/tor/torrc".
21. 5. 2017 1:35:36May 21 01:35:36.974 [warn] Failed to parse/validate config: Unknown option '_DOWNLOADER_DB_1_ENV_GOSU_VERSION'.  Failing.
21. 5. 2017 1:35:36May 21 01:35:36.975 [err] Reading config failed--see warnings above.
dperson commented 7 years ago

Okay, tor uses camelCase for it's configuration option names. I've modified the entry point script to skip any named values starting with tor_ that contain a second (or more) underscore character(s). Hopefully this will fix the issue you're seeing.

iBobik commented 7 years ago

Links use many many underscores, so it seems like a clever solution. :-)

Honza Pobořil https://honza.poboril.cz

    1. 2017 v 20:26, David Personette notifications@github.com:

Okay, tor uses camelCase for it's configuration option names. I've modified the entry point script to skip any named values starting with tor_ that contain a second (or more) underscore character(s). Hopefully this will fix the issue you're seeing.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dperson/torproxy/issues/15#issuecomment-303181602, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlfWJbnptB8_3IXFrxoBLvteGos2Lwgks5r8dNfgaJpZM4NhcsM.

renozion commented 1 year ago

hello, I am stuck on this error, cant find solution: Failed to parse/validate config: Unknown option 'service'. Failing. any clues?