[Feature] Implement support for TCP and UDP protocols concurrently in port forwarding configuration ?? #64

Closed
opened 2025-12-29 14:24:00 +01:00 by adam · 6 comments
Owner

Originally created by @abjoseph on GitHub (May 4, 2025).

Background:

I'm following the instructions on this page to setup a backend for Nextcloud Talk. The instructions mention exposing port 3478 with both tcp and udp.

Expected Behavior:

To be able to configure port forwarding for both TCP and UDP on same port, e.g some like:

      proxy.turn: |
        scheme: tcp,udp
        port: 3478:3478 # forward container port 3478 to host port 3478 

Actual Behavior:

Godoxy logs report that scheme value is invalid. Checking the docs and code reveal that only a single value of tcp, udp, https, etc are supported.

Feature Request:

Assess feasibility of supporting both tcp and udp protocols concurrently in a given port forwarding configuration. This would establish parity with a solution such as nginx proxy manager which allows for this scenario e.g:

Image

Originally created by @abjoseph on GitHub (May 4, 2025). ## Background: I'm following the instructions on this [page](https://nextcloud-talk.readthedocs.io/en/latest/quick-install/#post-installation) to setup a backend for Nextcloud Talk. The instructions mention exposing port 3478 with **both** tcp and udp. ## Expected Behavior: To be able to configure port forwarding for both TCP and UDP on same port, e.g some like: ```yaml proxy.turn: | scheme: tcp,udp port: 3478:3478 # forward container port 3478 to host port 3478 ``` ## Actual Behavior: Godoxy logs report that scheme value is invalid. Checking the docs and code reveal that only a single value of tcp, udp, https, etc are supported. ## Feature Request: Assess feasibility of supporting both tcp and udp protocols concurrently in a given port forwarding configuration. This would establish parity with a solution such as nginx proxy manager which allows for this scenario e.g: ![Image](https://github.com/user-attachments/assets/9f9e3725-8bdd-4843-958c-db7efbac4686)
adam added the bug label 2025-12-29 14:24:00 +01:00
adam closed this issue 2025-12-29 14:24:00 +01:00
Author
Owner

@yusing commented on GitHub (May 4, 2025):

UDP forwarding is buggy for now. Anyway here is how you can do this:

proxy.aliases: turn-tcp, turn-udp
proxy.#1.scheme: tcp
proxy.#2.port: udp
proxy.*.port: 3478:3478 # forward container port 3478 to host port 3478 
@yusing commented on GitHub (May 4, 2025): UDP forwarding is buggy for now. Anyway here is how you can do this: ```yaml proxy.aliases: turn-tcp, turn-udp proxy.#1.scheme: tcp proxy.#2.port: udp proxy.*.port: 3478:3478 # forward container port 3478 to host port 3478 ```
Author
Owner

@abjoseph commented on GitHub (May 4, 2025):

@yusing

Thanks for your response! I tried the suggested configuration, but I don't believe it worked as expected, see below:

Result from Proxies tab in WebUI:

It ended up assigning random ephemeral ports instead of the "3478" that was specified.

Image

Full Compose.yml for Context:

---
version: "3.9"
services:
  nextcloud_talk_hpb:
    container_name: nextcloud_talk_hpb
    image: ghcr.io/nextcloud-releases/aio-talk:20250424_092733
    labels:
      proxy.aliases: signaling, turn-tcp, turn-udp
      proxy.#2.scheme: tcp
      proxy.#3.scheme: udp
      proxy.*.port: 3478:3478
      #proxy.turn: |
      #  scheme: tcp
      #  port: 3478:3478 # forward container port 3478 to host port 3478
      proxy.signaling: |
        port: 8081
        homepage:
          name: Nextcloud Talk HPB
          icon: "@selfhst/nextcloud-talk.png"
          category: Docker
    restart: unless-stopped
    expose:
      - 8081
      - 3478
    #ports:
      #- 8081:8081
      #- 3478:3478/tcp
      #- 3478:3478/udp
    environment:
      - INTERNAL_SECRET
      - SIGNALING_SECRET
      - TURN_SECRET
      - TALK_PORT=3478
      - TALK_HOST=signaling.example.com
      - NC_DOMAIN=nextcloud.example.com
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"
    
@abjoseph commented on GitHub (May 4, 2025): @yusing Thanks for your response! I tried the suggested configuration, but I don't believe it worked as expected, see below: ### Result from *Proxies* tab in WebUI: It ended up assigning random ephemeral ports instead of the "3478" that was specified. ![Image](https://github.com/user-attachments/assets/bdcd0c99-6db9-4b7d-897e-11a1f9f0dafb) ### Full Compose.yml for Context: ```yaml --- version: "3.9" services: nextcloud_talk_hpb: container_name: nextcloud_talk_hpb image: ghcr.io/nextcloud-releases/aio-talk:20250424_092733 labels: proxy.aliases: signaling, turn-tcp, turn-udp proxy.#2.scheme: tcp proxy.#3.scheme: udp proxy.*.port: 3478:3478 #proxy.turn: | # scheme: tcp # port: 3478:3478 # forward container port 3478 to host port 3478 proxy.signaling: | port: 8081 homepage: name: Nextcloud Talk HPB icon: "@selfhst/nextcloud-talk.png" category: Docker restart: unless-stopped expose: - 8081 - 3478 #ports: #- 8081:8081 #- 3478:3478/tcp #- 3478:3478/udp environment: - INTERNAL_SECRET - SIGNALING_SECRET - TURN_SECRET - TALK_PORT=3478 - TALK_HOST=signaling.example.com - NC_DOMAIN=nextcloud.example.com logging: driver: "json-file" options: max-size: "1m" max-file: "1" ```
Author
Owner

@yusing commented on GitHub (May 5, 2025):

Noted. It will be fixed together with the UDP implementation.

@yusing commented on GitHub (May 5, 2025): Noted. It will be fixed together with the UDP implementation.
Author
Owner

@abjoseph commented on GitHub (May 5, 2025):

@yusing Thank you and certainly not urgent. I've been testing the tires since 0.9 but I hope to transition fully to it someday.

@abjoseph commented on GitHub (May 5, 2025): @yusing Thank you and certainly not urgent. I've been testing the tires since 0.9 but I hope to transition fully to it someday.
Author
Owner

@abjoseph commented on GitHub (Jun 14, 2025):

@yusing

I just re-tested this with the latest v0.15.0 and I can confirm it's working now; A huge thank you for the effort on this!!

I'll keep an eye on the logs and behavior and report back if I encounter anything out of the norm but so far, so good.

For reference, it's confirmed working with the below compose.yml:

---
version: "3.9"
services:
  nextcloud_talk_hpb:
    container_name: nextcloud_talk_hpb
    image: ghcr.io/nextcloud-releases/aio-talk:latest
    labels:
      proxy.aliases: signaling, turn-tcp, turn-udp
      proxy.turn-tcp.scheme: tcp
      proxy.turn-udp.scheme: udp
      proxy.turn-tcp.port: 7878:3478
      proxy.turn-udp.port: 7878:3478
      proxy.signaling: |
        port: 8081
        homepage:
          name: Nextcloud Talk HPB
          icon: "@selfhst/nextcloud-talk.png"
          category: Docker
    restart: unless-stopped
    expose:
      - 8081
      - 3478
    #ports:
      #- 8081:8081
      #- 3478:3478/tcp
      #- 3478:3478/udp
    environment:
      - INTERNAL_SECRET
      - SIGNALING_SECRET
      - TURN_SECRET
      - TALK_PORT=3478
      - TALK_HOST=signaling.example.com
      - NC_DOMAIN=nextcloud.example.com
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"
    
@abjoseph commented on GitHub (Jun 14, 2025): @yusing I just re-tested this with the latest v0.15.0 and I can confirm it's working now; A huge thank you for the effort on this!! I'll keep an eye on the logs and behavior and report back if I encounter anything out of the norm but so far, so good. For reference, it's confirmed working with the below compose.yml: ```yaml --- version: "3.9" services: nextcloud_talk_hpb: container_name: nextcloud_talk_hpb image: ghcr.io/nextcloud-releases/aio-talk:latest labels: proxy.aliases: signaling, turn-tcp, turn-udp proxy.turn-tcp.scheme: tcp proxy.turn-udp.scheme: udp proxy.turn-tcp.port: 7878:3478 proxy.turn-udp.port: 7878:3478 proxy.signaling: | port: 8081 homepage: name: Nextcloud Talk HPB icon: "@selfhst/nextcloud-talk.png" category: Docker restart: unless-stopped expose: - 8081 - 3478 #ports: #- 8081:8081 #- 3478:3478/tcp #- 3478:3478/udp environment: - INTERNAL_SECRET - SIGNALING_SECRET - TURN_SECRET - TALK_PORT=3478 - TALK_HOST=signaling.example.com - NC_DOMAIN=nextcloud.example.com logging: driver: "json-file" options: max-size: "1m" max-file: "1" ```
Author
Owner

@yusing commented on GitHub (Jun 15, 2025):

No problem 😉

@yusing commented on GitHub (Jun 15, 2025): No problem 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy-yusing#64