microsoft / microsoft/vscode-livepreview
Live Preview "Host IP" setting does not support IPv6 addresses
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 596
- Forks
- 119
- Avg merge
- 1d 4m
- Merged PRs (30d)
- 5
Description
Background
Support for specifying custom IP addresses was added by @andreamah as part of https://github.com/microsoft/vscode-livepreview/pull/117
The specific commit that adds this feature is 145f83606455f0b53f175f05142aa3a2d6632ea2 which has the following code snippet
Proposal
I propose that this code is changed so that it uses the NodeJS standard library's net.isIP which can properly validate IP addresses, and handle both IPv4 as well as IPv6
Next Steps
I think this would be a fairly simple fix, which I'm happy to code this up myself and submit a pull-request with the corresponding changes. Are there any other places I'd need to change, aside from connectionManager.ts? Is using a NodeJS library possible in the context of this extension? Or would I have to use an API from the front-end JavaScript side of things?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.