devcontainers / devcontainers/spec

Proposal: support forwarding UDP ports

Open
#643 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
5.7k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

> [!NOTE]
> I understand this feature may not be as simple as it sounds. It will likely mean changing the editors to support forwarding udp ports as the current implementations likely do not leverage docker for it.
>
> Anyway, I'm opening this issue to start the discussion because I haven't found one elsewhere.

It would be great if the following were possible:

```json
{
"forwardPorts": ["5683/udp"]
}
```

Or maybe:

```json
{
"forwardPorts": [5683],
"portsAttributes": {
"5683": {
"label": "CoAP",
"onAutoForward": "silent",
"protocol": "udp"
}
}
}
```

---

A workaround is to use the older `appPort`:

```json
{
"appPort": ["5683/udp"]
}
```

But `appPort` has limitations that `forwardPorts` don't have. For example, `appPort` ports cannot be labeled through `portAttributes`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.