mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-23 12:48:07 +00:00

* Initial Call, Switch from curl -s to curl -fsSL and wget to curl -fssL * more switches * switch vms * more curls * More curls * more * more * more changes * more * prepare ipv6 calls * change frontend to ipv6 * Formatting * Fromatting * Update gomft.sh * Update gomft-install.sh * Update ersatztv.sh * Update build.func --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
55 lines
1.6 KiB
Bash
55 lines
1.6 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2025 community-scripts ORG
|
|
# Author: miviro
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/heiher/hev-socks5-server
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
msg_info "Setup ${APPLICATION}"
|
|
RELEASE=$(curl -fsSL https://api.github.com/repos/heiher/${APPLICATION}/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
|
curl -L -o "${APPLICATION}" "https://github.com/heiher/${APPLICATION}/releases/download/${RELEASE}/hev-socks5-server-linux-x86_64"
|
|
mv ${APPLICATION} /opt/${APPLICATION}
|
|
chmod +x /opt/${APPLICATION}
|
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
|
curl -L -o "main.yml" "https://raw.githubusercontent.com/heiher/${APPLICATION}/refs/heads/master/conf/main.yml"
|
|
sed -i 's/^#auth:/auth:/; s/^# file: conf\/auth.txt/ file: \/root\/hev.creds/' main.yml
|
|
mkdir -p /etc/${APPLICATION}
|
|
USERNAME="admin"
|
|
PASSWORD=$(openssl rand -base64 16)
|
|
MARK="0"
|
|
echo "$USERNAME $PASSWORD $MARK" >/root/hev.creds
|
|
mv main.yml /etc/${APPLICATION}/main.yml
|
|
msg_ok "Setup ${APPLICATION}"
|
|
|
|
msg_info "Creating Service"
|
|
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
|
[Unit]
|
|
Description=${APPLICATION} Service
|
|
After=network.target
|
|
|
|
[Service]
|
|
ExecStart=/opt/${APPLICATION} /etc/${APPLICATION}/main.yml
|
|
Restart=always
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl enable -q --now ${APPLICATION}.service
|
|
msg_ok "Created Service"
|
|
|
|
motd_ssh
|
|
customize
|
|
|
|
msg_info "Cleaning up"
|
|
$STD apt-get -y autoremove
|
|
$STD apt-get -y autoclean
|
|
msg_ok "Cleaned"
|