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

feat(extractors/services): Add support for Tor #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KP64
Copy link
Contributor

@KP64 KP64 commented Jan 28, 2025

Simple support for Tor.
This should cover most needs.
Might be improved later on with more details extracting self-hosted onion Services if preferred.

mkIf _tor.enable {
name = "Tor";
icon = "services.tor";
info = optionalString _tor.relay.enable "Role: ${_tor.relay.role}";
Copy link
Owner

Choose a reason for hiding this comment

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

can we make this an mkIf then users can set info without mkForce if the relay is not enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to replicate erroneous behavior when setting info, while the relay option is disabled, however everything worked correctly even without mkForce. So there is no need?
What is interesting though is I found out that the strings get concatenated when the relay is enabled.
Let's say:

topology.self.services.tor = "lol";

In the node running tor, where a relay is enabled as role = "relay";
would lead to the info being Role: relay lol". Is that intended?

@KP64 KP64 requested a review from oddlama January 30, 2025 16:15
@oddlama
Copy link
Owner

oddlama commented Jan 30, 2025

@KP64 KP64 requested a review

I don't think you pushed anything 😅

@KP64
Copy link
Contributor Author

KP64 commented Jan 30, 2025

@KP64 KP64 requested a review

I don't think you pushed anything 😅

Yeah, Sorry. It was a misclick actually 😅

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