Compare commits
No commits in common. "cd9fddaa0d2a6ab36c21f6fbbe3e00b19cfcd5b6" and "88e0656f5ef3d77abb653ce3d46c1ed288af4e18" have entirely different histories.
cd9fddaa0d
...
88e0656f5e
@ -9,7 +9,7 @@
|
|||||||
- Username for VPN **and** SSH (用户名)
|
- Username for VPN **and** SSH (用户名)
|
||||||
- Password for VPN **and** SSH (密码)
|
- Password for VPN **and** SSH (密码)
|
||||||
- IPsec Pre-Shared Key for VPN (IPsec 预共享密钥)
|
- IPsec Pre-Shared Key for VPN (IPsec 预共享密钥)
|
||||||
- Operating System Image (操作系统镜像,Ubuntu 22.04/20.04/18.04 或 Debian 9)
|
- Operating System Image (操作系统镜像,Ubuntu 20.04/18.04 或 Debian 9)
|
||||||
- Virtual Machine Size (虚拟机大小,默认值: Standard_B1s)
|
- Virtual Machine Size (虚拟机大小,默认值: Standard_B1s)
|
||||||
|
|
||||||
**注:** \*不要\* 在值中使用这些字符: `\ " '`
|
**注:** \*不要\* 在值中使用这些字符: `\ " '`
|
||||||
@ -29,10 +29,4 @@
|
|||||||
|
|
||||||
## 屏幕截图
|
## 屏幕截图
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>
|
|
||||||
单击查看屏幕截图。
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
![Azure Custom Deployment](custom_deployment_screenshot.png)
|
![Azure Custom Deployment](custom_deployment_screenshot.png)
|
||||||
</details>
|
|
||||||
|
@ -9,7 +9,7 @@ Customizable with the following options:
|
|||||||
- Username for VPN **and** SSH
|
- Username for VPN **and** SSH
|
||||||
- Password for VPN **and** SSH
|
- Password for VPN **and** SSH
|
||||||
- IPsec Pre-Shared Key for VPN
|
- IPsec Pre-Shared Key for VPN
|
||||||
- Operating System Image (Ubuntu 22.04/20.04/18.04 or Debian 9)
|
- Operating System Image (Ubuntu 20.04/18.04 or Debian 9)
|
||||||
- Virtual Machine Size (Default: Standard_B1s)
|
- Virtual Machine Size (Default: Standard_B1s)
|
||||||
|
|
||||||
**Note:** DO NOT use these special characters within values: `\ " '`
|
**Note:** DO NOT use these special characters within values: `\ " '`
|
||||||
@ -29,10 +29,4 @@ Copyright (C) 2017-2022 [Lin Song](https://github.com/hwdsl2)
|
|||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>
|
|
||||||
Click to see screenshot.
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
![Azure Custom Deployment](custom_deployment_screenshot.png)
|
![Azure Custom Deployment](custom_deployment_screenshot.png)
|
||||||
</details>
|
|
||||||
|
@ -24,14 +24,13 @@
|
|||||||
"image": {
|
"image": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
"ubuntu22.04",
|
|
||||||
"ubuntu20.04",
|
"ubuntu20.04",
|
||||||
"ubuntu18.04",
|
"ubuntu18.04",
|
||||||
"debian9"
|
"debian9"
|
||||||
],
|
],
|
||||||
"defaultValue": "ubuntu22.04",
|
"defaultValue": "ubuntu20.04",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "OS to use. Ubuntu 22.04/20.04/18.04 or Debian 9."
|
"description": "OS to use. Ubuntu 20.04/18.04 or Debian 9."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"VMSize": {
|
"VMSize": {
|
||||||
@ -62,12 +61,6 @@
|
|||||||
"vhdStorageType": "Standard_LRS",
|
"vhdStorageType": "Standard_LRS",
|
||||||
"vnetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
"vnetId": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]",
|
||||||
"SubnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]",
|
"SubnetRef": "[concat(variables('vnetId'), '/subnets/', variables('subnetName'))]",
|
||||||
"ubuntu22.04": {
|
|
||||||
"publisher": "Canonical",
|
|
||||||
"offer": "0001-com-ubuntu-server-jammy",
|
|
||||||
"sku": "22_04-lts",
|
|
||||||
"version": "latest"
|
|
||||||
},
|
|
||||||
"ubuntu20.04": {
|
"ubuntu20.04": {
|
||||||
"publisher": "Canonical",
|
"publisher": "Canonical",
|
||||||
"offer": "0001-com-ubuntu-server-focal",
|
"offer": "0001-com-ubuntu-server-focal",
|
||||||
|
@ -80,7 +80,6 @@ check_os() {
|
|||||||
exiterr "This script only supports Ubuntu and Debian."
|
exiterr "This script only supports Ubuntu and Debian."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
os_arch=$(uname -m | tr -dc 'A-Za-z0-9_-')
|
|
||||||
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
|
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
|
||||||
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
||||||
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
||||||
@ -536,19 +535,6 @@ apply_gcp_mtu_fix() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_xl2tpd_fix() {
|
|
||||||
if [ "$os_type" = "ubuntu" ] && [ "$os_ver" = "bookwormsid" ] && [ "$os_arch" = "x86_64" ]; then
|
|
||||||
xl2tpd_url="https://mirrors.kernel.org/ubuntu/pool/universe/x/xl2tpd"
|
|
||||||
deb_file="xl2tpd_1.3.16-1ubuntu0.1_amd64.deb"
|
|
||||||
cd /opt/src || exit 1
|
|
||||||
if wget -t 3 -T 30 -q -O "$deb_file" "$xl2tpd_url/$deb_file"; then
|
|
||||||
bigecho "Applying fix for xl2tpd..."
|
|
||||||
apt-get -yqq install "./$deb_file" >/dev/null
|
|
||||||
fi
|
|
||||||
/bin/rm -f "$deb_file"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
enable_on_boot() {
|
enable_on_boot() {
|
||||||
bigecho "Enabling services on boot..."
|
bigecho "Enabling services on boot..."
|
||||||
IPT_PST=/etc/init.d/iptables-persistent
|
IPT_PST=/etc/init.d/iptables-persistent
|
||||||
@ -701,7 +687,6 @@ vpnsetup() {
|
|||||||
create_vpn_config
|
create_vpn_config
|
||||||
update_sysctl
|
update_sysctl
|
||||||
update_iptables
|
update_iptables
|
||||||
apply_xl2tpd_fix
|
|
||||||
apply_gcp_mtu_fix
|
apply_gcp_mtu_fix
|
||||||
enable_on_boot
|
enable_on_boot
|
||||||
start_services
|
start_services
|
||||||
|
Loading…
Reference in New Issue
Block a user