[GH-ISSUE #32] Customizable CTRL_PORT for tunnelto_server? #29

Closed
opened 2026-03-02 23:01:51 +03:00 by kerem · 1 comment
Owner

Originally created by @mxxk on GitHub (Nov 9, 2020).
Original GitHub issue: https://github.com/agrinman/tunnelto/issues/32

The environment variable CTRL_PORT is useful to override the control port used for the tunnelto client to connect to tunnelto_server, but there seems to be no equivalent to override the control port tunnelto_server binds to, as it is hardcoded:

github.com/agrinman/tunnelto@b3bb05709f/tunnelto_server/src/main.rs (L59)

github.com/agrinman/tunnelto@b3bb05709f/tunnelto_server/src/remote.rs (L7)

While not critical, it would be nice to set the tunnelto_server control port via an environment variable. 🙂

The larger context for doing this is https://github.com/mxxk/tunnelto-proxy, which provides a proxy configuration for multiplexing between control traffic (on the root domain) and tunnel traffic (on subdomains). Having something like this be integrated into tunnelto directly would be a very significant undertaking, and different from the current approach used by tunnelto.dev where the control traffic is expected at wormhole.tunnelto.dev (and presumably wormhole is in BLOCKED_SUB_DOMAINS), while all other (tunnel) traffic is expected at *.tunnelto.dev.

Originally created by @mxxk on GitHub (Nov 9, 2020). Original GitHub issue: https://github.com/agrinman/tunnelto/issues/32 The environment variable `CTRL_PORT` is useful to override the control port used for the `tunnelto` client to connect to `tunnelto_server`, but there seems to be no equivalent to override the control port `tunnelto_server` binds to, as it is hardcoded: https://github.com/agrinman/tunnelto/blob/b3bb05709fe59920e052553fd63df901fbd5598e/tunnelto_server/src/main.rs#L59 https://github.com/agrinman/tunnelto/blob/b3bb05709fe59920e052553fd63df901fbd5598e/tunnelto_server/src/remote.rs#L7 While not critical, it would be nice to set the `tunnelto_server` control port via an environment variable. 🙂 The larger context for doing this is https://github.com/mxxk/tunnelto-proxy, which provides a proxy configuration for multiplexing between control traffic (on the root domain) and tunnel traffic (on subdomains). Having something like this be integrated into `tunnelto` directly would be a very significant undertaking, and different from the current approach used by `tunnelto.dev` where the control traffic is expected at `wormhole.tunnelto.dev` (and presumably `wormhole` is in `BLOCKED_SUB_DOMAINS`), while all other (tunnel) traffic is expected at `*.tunnelto.dev`.
kerem closed this issue 2026-03-02 23:01:52 +03:00
Author
Owner

@agrinman commented on GitHub (Nov 10, 2020):

Happy to take a PR on this (with a fallback default to 5000)

<!-- gh-comment-id:724826245 --> @agrinman commented on GitHub (Nov 10, 2020): Happy to take a PR on this (with a fallback default to 5000)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tunnelto#29
No description provided.