envoyproxy/envoy

network: address interface should pair port:proto

Open

#17,429 建立於 2021年7月20日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C++ (5,373 fork)batch import
area/listenerhelp wantedtech debt

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

As per the discussion here: https://github.com/envoyproxy/envoy/pull/17414

In a perfect world our Address interface should include proto with port, as the operating system treats TCP:1234 differently from UDP:1234. Unfortunately, this will have very large implications on the overall code structure. There are a few things we might consider here:

  1. Remove port from the primary Address interface, as certain use cases do not actually care about port and proto. For example DNS, IP tagging, etc.
  2. Introduce a AddressAndPort interface which includes an address as well as a port/proto pair. Then, any port must have an associated proto with it as well.

Either way this needs some thinking and prototyping.

貢獻者指南