# wsl-expose

A convenient CLI tool to expose Windows Subsystem for Linux (WSL) ports to the Local Area Network (LAN) by automatically configuring Windows `netsh portproxy` and Firewall rules.

## Installation

Ensure you are in the project root directory where `pyproject.toml` is located, then run:

```sh
uv tool install .
```

## Usage

**Note:** You must run this command from an **Administrator** terminal (e.g., PowerShell as Administrator) to add or remove ports, because Windows `netsh` and firewall configurations require elevated privileges.

### Expose a Port

To expose a port (e.g., 8080) running inside your WSL instance to your Windows host's LAN IP:

```sh
wsl-expose add 8080
```

### Remove an Exposed Port

To remove the port mapping and firewall rule:

```sh
wsl-expose remove 8080
```

### List Exposed Ports

To see all currently configured WSL port proxies:

```sh
wsl-expose list
```
