todo

wsl2 portproxy,windows端口转发

up:2021-05-06 10:43:46 edit:2025-02-28 08:12:54 view:1068
$wslip=$(wsl bash -c 'ip addr | grep eth0 | grep inet | awk ''{ print \$2 }''| awk -F/ ''{print \$1}''')
Write-Output "wsl2 ip is $wslip"
netsh interface portproxy show all
netsh interface portproxy set v4tov4 listenport=6768 listenaddress=ipOrHost connectaddress=$wslip
Write-Output 'after reset'
netsh interface portproxy show all

not in sinaapp