Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tor-hs: refactor + readme fixes #25162

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

systemcrash
Copy link
Contributor

Maintainer: me / @stokito

Run tested: 23.05.5 x86_64

Description: refactor to clean up init scripts

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
@systemcrash
Copy link
Contributor Author

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.

@stokito
Copy link
Contributor

stokito commented Oct 17, 2024

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

@@ -8,10 +8,11 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=tor-hs
PKG_VERSION:=0.0.1
PKG_RELEASE:=3
PKG_VERSION:=0.0.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new option (functionality) so we may increase the minor version to v0.1.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR can own 0.1. :)

net/tor-hs/README.md Show resolved Hide resolved
net/tor-hs/files/tor-hs.conf Show resolved Hide resolved
net/tor-hs/files/tor_rpcd.sh Outdated Show resolved Hide resolved
net/tor-hs/files/tor_rpcd.sh Outdated Show resolved Hide resolved
net/tor-hs/files/tor_rpcd.sh Outdated Show resolved Hide resolved
echo "{"
echo '"hs-list":['

json_init
Copy link
Contributor

@stokito stokito Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the string concatenation was faster and used less code

net/tor-hs/files/tor_rpcd.sh Show resolved Hide resolved
@@ -41,60 +41,54 @@ config_tor() {
handle_hs_ports_conf() {
local public_port local_port
local value="$1"
local ipv4="$2"
local ipaddr="$2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact this may be not an IP but a unix socket and using of them is even more preferable because you can assign permissions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's nothing that prevents ipaddr from holding a socket string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you suggest a rename?

The changes still produce synonymous output; just a refactor.

Including addition of IPv6 (available tor version supports it)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants