Skip to content

fix: accept boundary ports in forwarding mappings - #12

Open
dr-hoseyn wants to merge 1 commit into
AminMGMT:mainfrom
dr-hoseyn:fix/boundary-port-mappings
Open

fix: accept boundary ports in forwarding mappings#12
dr-hoseyn wants to merge 1 commit into
AminMGMT:mainfrom
dr-hoseyn:fix/boundary-port-mappings

Conversation

@dr-hoseyn

Copy link
Copy Markdown

Summary

  • accept the valid boundary ports 1 and 65535 in local=remote forwarding mappings
  • centralize numeric-port-to-listen-address conversion for all seven server transports
  • preserve explicit IPv4/IPv6 listen addresses

Why

Validation accepts the full 1..65535 port range, but each transport used port > 1 && port < 65535 while parsing local=remote. As a result, mappings such as 1=127.0.0.1:80 and 65535=127.0.0.1:80 were treated as malformed listen addresses at runtime.

Affected transports

TCP, TCPMUX, KCP, QUIC, UDP, WS, and WSMUX.

Verification

  • focused helper tests pass natively
  • GOOS=linux GOARCH=amd64 go vet ./internal/server/transport
  • GOOS=linux GOARCH=amd64 go test -c ./internal/server/transport

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.

1 participant