Add multiple port and services support#13
Open
KaueTech wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tor Hidden Service Dynamic Port Configurator
This script automatically configures Tor hidden services based on environment variables.
It is designed to be used as an entrypoint in a Docker container.
📌 Usage
Define environment variables prefixed with
HS_.Each variable defines one hidden service.
Format:
🔧 Port Specification (
port_spec)Single port
→ maps virtual port
80to target port80Target : Virtual pair
→ maps target port
8080to virtual port80Range of ports
→ maps virtual ports
9000-9010to target ports9000-9010Single port to multiple virtual ports
→ maps target port
80to virtual ports9000-9010Grouped list
→ groups multiple ports for a single host
📚 Examples
Single port
HS_SINGLE_PORT="web:80"Set target → virtual
HS_SET_VIRTUAL_PORT="web:80:81"Port range
HS_PORT_RANGE="web:80-100"HS_VIRTUAL_PORT_RANGE="web:80:80-100"Grouped mapping
HS_GROUP="web:(80:8080, 443, 443:444, 5000-5010, 80:80-100)"Multiple services
HS_MULTI_SERVICES="web:81; web:(80,443); api:9000-9005; electrs:(50001,50002)"🐳 Docker Compose Example