Skip to content

Commit

Permalink
Fix Azure deploy
Browse files Browse the repository at this point in the history
- Fix handling of special characters in the Azure deployment config
  by quoting the VPN parameters
- Fixes hwdsl2#644. Thanks @turbozapekanka for the report!
  • Loading branch information
hwdsl2 committed Nov 2, 2019
1 parent 3858040 commit 3b6a614
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions azure/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
- Operating System Image (操作系统镜像,Debian 9 或 Ubuntu 16.04 LTS)
- Virtual Machine Size (虚拟机大小,默认值: Standard_B1s)

**注:** \*不要\* 在值中使用这些字符: `\ " '`

请单击以下按钮开始:

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fhwdsl2%2Fsetup-ipsec-vpn%2Fmaster%2Fazure%2Fazuredeploy.json" target="_blank">
Expand Down
2 changes: 2 additions & 0 deletions azure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Customizable with the following options:
- Operating System Image (Debian 9 or Ubuntu 16.04 LTS)
- Virtual Machine Size (Default: Standard_B1s)

**Note:** DO NOT use these special characters within values: `\ " '`

Press this button to start:

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fhwdsl2%2Fsetup-ipsec-vpn%2Fmaster%2Fazure%2Fazuredeploy.json" target="_blank">
Expand Down
3 changes: 2 additions & 1 deletion azure/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
}
},
"variables": {
"quote": "'",
"location": "[resourceGroup().location]",
"vmName": "vpnserver",
"virtualNetworkName": "vpnVnet",
Expand All @@ -71,7 +72,7 @@
"version": "latest"
},
"installScriptURL": "https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/azure/install.sh",
"installCommand": "[concat('sh install.sh ', parameters('preSharedKey'), ' ', parameters('username'), ' ', parameters('password'))]"
"installCommand": "[concat('sh install.sh ', variables('quote'), parameters('preSharedKey'), variables('quote'), ' ', variables('quote'), parameters('username'), variables('quote'), ' ', variables('quote'), parameters('password'), variables('quote'))]"
},
"resources": [
{
Expand Down

0 comments on commit 3b6a614

Please sign in to comment.