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

fix: handle ports in multiaddrs with SNI tuples #154

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

achingbrain
Copy link
Member

When non-default http/https ports are encountered, ensure we set them in the final URI correctly.

Also remove default 80/443 ports from ws:// and wss:// URIs same as http:// and https://.

E.g.:

'/ip4/1.2.3.4/tcp/443/tls/sni/ipfs.io/http' -> 'https://ipfs.io'
'/ip4/1.2.3.4/tcp/1234/tls/sni/ipfs.io/http' -> 'https://ipfs.io:1234'
'/ip4/1.2.3.4/tcp/443/tls/sni/ipfs.io/ws' -> 'wss://ipfs.io'
'/ip4/1.2.3.4/tcp/1234/tls/sni/ipfs.io/ws' -> 'wss://ipfs.io:1234'

When non-default http/https ports are encountered, ensure we set
them in the final URI correctly.

Also remove default 80/443 ports from `ws://` and `wss://` URIs
same as `http://` and `https://`.
@achingbrain achingbrain changed the title fix: handle ports with SNI tuples fix: handle ports in multiaddrs with SNI tuples Oct 26, 2024
@achingbrain achingbrain merged commit 9fd5bdb into main Oct 28, 2024
20 checks passed
@achingbrain achingbrain deleted the fix/handle-ports-with-sni-correctly branch October 28, 2024 16:21
github-actions bot pushed a commit that referenced this pull request Oct 28, 2024
## [10.1.2](v10.1.1...v10.1.2) (2024-10-28)

### Bug Fixes

* handle ports in multiaddrs with SNI tuples ([#154](#154)) ([9fd5bdb](9fd5bdb))
Copy link

🎉 This PR is included in version 10.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants