From 4d9a7ad3bb642eca3dfd0ff8a42ff03fc01f8767 Mon Sep 17 00:00:00 2001 From: Netch Date: Tue, 20 Jul 2021 09:06:59 +0800 Subject: [PATCH] Add xray-plugin --- scripts/deps/xray-plugin.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/deps/xray-plugin.ps1 diff --git a/scripts/deps/xray-plugin.ps1 b/scripts/deps/xray-plugin.ps1 new file mode 100644 index 00000000..f9cf5d12 --- /dev/null +++ b/scripts/deps/xray-plugin.ps1 @@ -0,0 +1,18 @@ +param([string]$OutputPath) +$name="xray-plugin.tar.gz" +$address="https://github.com/teddysun/xray-plugin/releases/download/v1.4.2/xray-plugin-windows-amd64-v1.4.2.tar.gz" + +..\scripts\download.ps1 $name $address +if (-Not $?) { exit $lastExitCode } + +7z x $name +if (-Not $?) { exit $lastExitCode } + +7z x "xray-plugin.tar" +if (-Not $?) { exit $lastExitCode } + +Move-Item -Force "xray-plugin_windows_amd64.exe" "$OutputPath\xray-plugin.exe" + +Remove-Item -Recurse -Force $name +Remove-Item -Recurse -Force xray-plugin.tar +exit 0 \ No newline at end of file