Skip to content

Commit

Permalink
wsl ports (#97)
Browse files Browse the repository at this point in the history
Document notary server WSL port forwarding

fixes #96

Co-authored-by: Hendrik Eeckhaut <[email protected]>
  • Loading branch information
maceip and heeckhau authored Sep 18, 2024
1 parent 06d771f commit e8fd3aa
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/developers/notary_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,26 @@ You can utilize this WebSocket proxy with the following syntax:
wss://notary.pse.dev/proxy?token=<domain>
```

Replace `<domain>` with the domain you wish to access (for example, `swapi.dev`).
Replace `<domain>` with the domain you wish to access (for example, `swapi.dev`).

## Running Notary Server on Windows Subsystem for Linux (WSL)

When running the Notary Server and WebSocket Proxy on Windows Subsystem for Linux (WSL), you may encounter networking issues. In older versions of Windows (prior to Windows 11 22H2), WSL uses a virtual Ethernet adapter with its own IP address, which requires additional firewall configuration.

#### For Windows Versions Prior to 11 22H2:

1. **Identify the WSL IP Address**:
Run the following command inside the WSL terminal:
```bash
wsl hostname -I
```

2. **Configure Port Forwarding on the Windows Host**:
To forward traffic from the Windows host to the Notary Server inside WSL, set up port forwarding. Run the following PowerShell command on your Windows host, replacing `connectaddress` with the WSL IP address you retrieved in the previous step:
```powershell
netsh interface portproxy add v4tov4 listenport=7047 listenaddress=0.0.0.0 connectport=7047 connectaddress=192.168.101.100
```

#### For Windows 11 22H2 and Later:

In newer versions of Windows (Windows 11 22H2 and above), networking has been simplified with the introduction of mirrored mode. This mode allows WSL instances to share the host’s network interface, eliminating the need for manual port forwarding configurations. You can enable mirrored mode as recommended by Microsoft [here](https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking).

0 comments on commit e8fd3aa

Please sign in to comment.