Skip to content

Conversation

@yixinin
Copy link

@yixinin yixinin commented Jun 17, 2025

@seanmonstar
Copy link
Owner

I see, and this option would really only apply to HTTP/3 because UDP? It would be problematic for HTTP/1 and 2 because once the port is used, all other connections would fail.

If I have that right, should the docs point out that this option only applies for HTTP/3? (I know curl has a similar option for all connections, and also LOCALPORTRANGE to try to handle the port already used, but seems annoying to me.)

@yixinin
Copy link
Author

yixinin commented Jun 18, 2025

problematic

I see, and this option would really only apply to HTTP/3 because UDP? It would be problematic for HTTP/1 and 2 because once the port is used, all other connections would fail.

If I have that right, should the docs point out that this option only applies for HTTP/3? (I know curl has a similar option for all connections, and also LOCALPORTRANGE to try to handle the port already used, but seems annoying to me.)

correct, this local_port option only used for HTTP/3 (QUIC/UDP connection), it wont affect HTTP/1 or 2 (TCP connection), cause they have different 5-tuple, in most cases we don't need specify local_port, some special network environment especially P2P(Peer-To-Peer connection) need use local port which by (stun -> hole punch) through NAT.

@seanmonstar
Copy link
Owner

Sounds fair to me. Looks like CI is failing, want to fix and adjust the docs that this only affects HTTP/3?

@yixinin yixinin marked this pull request as ready for review June 19, 2025 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants