Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
windows:wsl [2021/09/02 11:08] – [WSL2 port forwarding] admin | windows:wsl [2022/12/27 17:56] (current) – [WSL2 port forwarding high cpu] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== wsl vhdx compact, method ====== | + | ====== wsl vhdx compact, method, reclaim |
- | * https:// | + | * diskpart |
+ | ++++ Diskpart | | ||
+ | <code BASH> | ||
+ | select vdisk File=”I: | ||
+ | attach vdisk readonly | ||
+ | compact vdisk | ||
+ | detach vdisk | ||
+ | </ | ||
+ | ++++ | ||
+ | |||
+ | ====== WSL2 high cpu ====== | ||
+ | < | ||
+ | taskkill -IM " | ||
+ | wsl --shutdown | ||
+ | </ | ||
====== WSL2 port forwarding ====== | ====== WSL2 port forwarding ====== | ||
Line 9: | Line 23: | ||
<code BASH> netsh interface portproxy add v4tov4 listenport=$PORT listenaddress=0.0.0.0 connectport=$PORT connectaddress=127.0.0.1 </ | <code BASH> netsh interface portproxy add v4tov4 listenport=$PORT listenaddress=0.0.0.0 connectport=$PORT connectaddress=127.0.0.1 </ | ||
:!: | :!: | ||
- | ++++ PowerShell Script for port forward| | + | ++++ PowerShell Script for tcp port forward| |
<code bash> | <code bash> | ||
Line 57: | Line 71: | ||
# Show rules | # Show rules | ||
netsh interface portproxy show all | netsh interface portproxy show all | ||
+ | |||
+ | # Reset all | ||
+ | netsh interface portproxy reset | ||
</ | </ | ||
++++ | ++++ | ||
+ | ++++ PowerShell Script for udp port forward socat| | ||
+ | <code bash> | ||
+ | # https:// | ||
+ | # udp forward https:// | ||
+ | # distr https:// | ||
+ | socat UDP4-RECVFROM: | ||
+ | </ | ||
+ | ++++ | ||
+ | |||
====== Windows system linux ====== | ====== Windows system linux ====== |