WSL2 终于支持分配外部 IP 了
source link: https://www.v2ex.com/t/831048
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一个 linux 子系统,只能从本机 windows 上通过 localhost 访问可太艹了。要经过一系列复杂的骚操作才能局域网下访问到 wsl 的特定端口。追了这个 issue 两年 https://github.com/microsoft/WSL/issues/4150 现在微软终于在 preview 版本(store 里提供)把这个问题解决了,具体看这一个 comment: https://github.com/microsoft/WSL/issues/4150#issuecomment-1018524753
需要先给 hyper-v 配置 external switch ,注意如果你的网卡是 intel ax200 或者 ax201 ,添加 external switch 会失败,解决办法: https://pomeroy.me/2020/08/hyper-v-virtual-switch-creation-woes/#comment-411452
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK