Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
add initial plugin stuff to vpnkit
Browse files Browse the repository at this point in the history
  • Loading branch information
clf-mstrigl authored and mriedmann committed Nov 29, 2022
1 parent 49a2ace commit f64afee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docker/root/etc/DockerInWsl/diw-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ log() {

### common vars
CMDSHELL="$(command -v cmd.exe || echo '/mnt/c/Windows/system32/cmd.exe')"
PROGRAMFILES="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %PROGRAMFILES%' | tr -d '\n\r')")"
APPDATA="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %APPDATA%' | tr -d '\n\r')")"
LOCALAPPDATA="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %LOCALAPPDATA%' | tr -d '\n\r')")"

DIW_USER="docker"
DIW_LINUSER_HOME="/home/${DIW_USER}"
DIW_WINUSER_HOME="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %USERPROFILE%' | tr -d '\n\r')")"
Expand Down
5 changes: 2 additions & 3 deletions docker/root/usr/local/bin/wsl-vpnkit
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
# USE OR OTHER DEALINGS IN THE SOFTWARE.

set -eo pipefail
. /etc/DockerInWsl/diw-commons.sh
_diw_plugin_globalvars

CMDSHELL="$(command -v cmd.exe || echo '/mnt/c/Windows/system32/cmd.exe')"
PROGRAMFILES="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %PROGRAMFILES%' | tr -d '\n\r')")"
LOCALAPPDATA="$(wslpath "$($CMDSHELL /V:OFF /C 'echo %LOCALAPPDATA%' | tr -d '\n\r')")"
CONF_PATH="$LOCALAPPDATA/DockerInWSL/wsl-vpnkit/wsl-vpnkit.conf"
HTTP_PROXY_CONFIG_PATH="$LOCALAPPDATA/DockerInWSL/wsl-vpnkit/http-proxy.json"
SOCKET_PATH="/var/run/wsl-vpnkit.sock"
Expand Down

0 comments on commit f64afee

Please sign in to comment.