---
title: WSL2
description: 
---

These instructions allow you to use your Windows VPNGUI connection within WSL2.

## Setup

* Disconnect VPNGUI (if currently connected).
* Enable **Connection Sharing** in the VPNGUI **Preferences**.
* Connect VPNGUI to VPN server using the **WEB or XTLS connection type**.

VPNGUI is now ready to share its connection with other devices on your LAN.

Within a WSL2 shell, now run the following commands (or include them in your .zshrc):

```
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
alias www="https_proxy=\"http://${hostip}:16005\" http_proxy=\"http://${hostip}:16005\""
export hostip=$(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }')
export https_proxy="http://${hostip}:16005"
export http_proxy="http://${hostip}:16005"
```

The proxy port is 16005 when using WEB (as shown above). Replace this with 16006 if you use XTLS.

## Security

Please do not use **Connection Sharing** on public Wi-Fi network as it allows others to use your VPN connection.