Skip to content

Add multiple port and services support#13

Open
KaueTech wants to merge 3 commits into
hundehausen:mainfrom
dockeasy:add-multiport-support
Open

Add multiple port and services support#13
KaueTech wants to merge 3 commits into
hundehausen:mainfrom
dockeasy:add-multiport-support

Conversation

@KaueTech

@KaueTech KaueTech commented Sep 8, 2025

Copy link
Copy Markdown

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:

HS_<SERVICE_NAME>="host1:port_spec1;host2:port_spec2;..."

🔧 Port Specification (port_spec)

  • Single port

    80

    → maps virtual port 80 to target port 80

  • Target : Virtual pair

    8080:80

    → maps target port 8080 to virtual port 80

  • Range of ports

    9000-9010

    → maps virtual ports 9000-9010 to target ports 9000-9010

  • Single port to multiple virtual ports

    80:9000-9010

    → maps target port 80 to virtual ports 9000-9010

  • Grouped list

    (80,443,8080:80)

    → 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

environment:
  HS_MULTI_SERVICES: |
    web:(80,443);
    api:9000-9005;
    electrs:(50001,50002)

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.

1 participant