packages icon indicating copy to clipboard operation
packages copied to clipboard

tor-hs: refactor + readme fixes

Open systemcrash opened this issue 1 year ago • 2 comments

Maintainer: me / @stokito

Run tested: 23.05.5 x86_64

Description: refactor to clean up init scripts

systemcrash avatar Oct 17 '24 21:10 systemcrash

Just read also @stokito's other PR and he actually made some similar changes. I added him as another maintainer, in any case. This should give a decent base for @stokito's other PR to get cleaned up.

systemcrash avatar Oct 17 '24 21:10 systemcrash

IMHO it would be better to merge the #21642 It has many atomic commits

stokito avatar Oct 17 '24 22:10 stokito

I found the code section problematic when using a non default path for the generated file

	# clean config
	echo "" > $TORRC_FILE

Also changing the default path from /etc/tor/torrc_generated to /tmp/torrc_generated would reduce writes to flash memory during startup.

codekow avatar Jan 02 '25 05:01 codekow

@codekow Please review and test my PR first https://github.com/openwrt/packages/pull/21642 The original maintainer of the package is not reachable anymore.

changing the default path from /etc/tor/torrc_generated to /tmp/torrc_generated would reduce writes to flash memory

I also proposed this:

The tor-hs itself has a problem that the generated file is stored to /etc/tor/torrc_generated which may kill NAND flash eventually. Instead we may generate the file into /var/run/tor older which is an in-memory temp folder. The generation itself may be skipped if last modify time of uci config file is before the created time of the /etc/tor/torrc_generated. The simple optimization but may safe some time on restart.

If you can prepare and test a PR with the change that would be great. I think it would be great to push the two PRs first

stokito avatar Jan 02 '25 07:01 stokito

hi @systemcrash if you are busy then I'll make a new PR with these changes merged with the current master. I hope that I can do that on the weekend.

stokito avatar Nov 06 '25 10:11 stokito