DOCS FIX: WSL Port Forwarding Loop.

Previously, the guide suggested to port forward `listenaddress=0.0.0.0` to `connectaddress=localhost`.
The port forwarding service will listen on all available network interfaces on the specified port.
When an incoming connection is received, the service will forward the connection to localhost (or 127.0.0.1) on the same port.
Since localhost is a loopback address, the connection will be sent back to the same machine that's running the port forwarding service.
The connection will then be received by the port forwarding service again, which will forward it to localhost again, and so on.

This noticeably hits on the performance of the machine.
This commit is contained in:
SpyTech Labs 2024-11-07 03:57:05 +06:00 committed by GitHub
parent cc8c7ed209
commit 107c341f2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,9 +135,12 @@ When you git clone a repository, put it inside WSL and not outside. To understan
### Bonus: Port Forwarding ### Bonus: Port Forwarding
By default, you won't be able to access the webui from another device on your local network. You will need to setup the appropriate port forwarding using the following command (using PowerShell or Terminal with administrator privileges). By default, you won't be able to access the webui from another device on your local network. You will need to setup the appropriate port forwarding using the following steps:
1. First, get the IP address of the WSL by typing `wsl hostname -I`. This will output the IP address, for example `172.20.134.111`.
2. Then, use the following command (using PowerShell or Terminal with administrator privileges) to set up port forwarding, replacing `172.20.134.111` with the IP address you obtained in step 1:
``` ```
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=7860 connectaddress=localhost connectport=7860 netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=7860 connectaddress=172.20.134.111 connectport=7860
``` ```