Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect-tcp: use target_port instead of tcp_port #2713

Open
DavidSchinazi opened this issue Jan 25, 2024 · 4 comments · May be fixed by #2736
Open

connect-tcp: use target_port instead of tcp_port #2713

DavidSchinazi opened this issue Jan 25, 2024 · 4 comments · May be fixed by #2736
Labels
connect-tcp draft-ietf-httpbis-connect-tcp

Comments

@DavidSchinazi
Copy link
Contributor

The draft currently defines the "target_host" and "tcp_port" variables. We should replace "tcp_port" with "target_port" for consistency with connect-udp. This consistency isn't just cosmetic, it simplifies reusing the same URI template for both protocols.

@DavidSchinazi DavidSchinazi added the connect-tcp draft-ietf-httpbis-connect-tcp label Jan 25, 2024
@bemasc
Copy link
Contributor

bemasc commented Jan 25, 2024

The distinction is deliberate, precisely because it facilitates using a single URI template for both protocols. As discussed in Section 5.3, the client can use a single template for various purposes by inspecting the variables that it contains:

  • "target_port" -> connect-udp
  • "tcp_port" -> connect-tcp
  • "ipproto" -> connect-ip
  • "dns" -> DoH

Using the same name ("target_port") for TCP and UDP would add complexity for client implementors. Instead of being able to determine a priori whether a proxy supports TCP and UDP based on the template, the client would have to probe (and periodically re-probe) for this information and maintain dynamic state about which protocols are supported.

@DavidSchinazi
Copy link
Contributor Author

What you're saying is that a client can infer support for certain protocols based on the variables present in the URI template. That's not correct, or more precisely it wasn't specified for connect-udp, and it definitely doesn't work for connect-ip (in connect-ip the variables are optional).

@bemasc
Copy link
Contributor

bemasc commented Jan 25, 2024

OK, I see that it doesn't work for connect-ip, so connect-ip can only be supported by probing or with an out-of-band signal (or with an ecosystem restriction that connect-ip servers must support "target" and "ipproto").

It seems fine for connect-udp and connect-tcp because the variables are mandatory, so it would provide value to UDP+TCP clients (which seem likely to be common).

@DavidSchinazi
Copy link
Contributor Author

In that case we should state somewhere that passing around an URI template with these variables implies support for the corresponding mechanism. I'm not sure we'd get consensus on that though.

bemasc added a commit that referenced this issue Feb 14, 2024
Changes:

* s/tcp_port/target_port/ (aligning with connect-udp)
* Make IP lists comma-separated instead of RFC 6570 list types.

Fixes #2713 and #2714
bemasc added a commit that referenced this issue Feb 14, 2024
Changes:

* s/tcp_port/target_port/ (aligning with connect-udp)
* Make IP lists comma-separated instead of RFC 6570 list types.

Fixes #2713 and #2714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connect-tcp draft-ietf-httpbis-connect-tcp
2 participants