Files
ProxmoxVE/install/hev-socks5-server-install.sh
T

45 lines
1.3 KiB
Bash
Raw Normal View History

2025-02-23 18:44:04 +01:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
2025-02-23 18:44:04 +01:00
# 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
fetch_and_deploy_gh_release "hev-socks5-server" "heiher/hev-socks5-server" "singlefile" "latest" "/opt" "hev-socks5-server-linux-$(arch_resolve "x86_64" "arm64")"
2026-01-19 13:36:59 +01:00
msg_info "Setup hev-socks5-server"
mkdir -p /etc/hev-socks5-server
download_file "https://raw.githubusercontent.com/heiher/hev-socks5-server/refs/heads/main/conf/main.yml" "/etc/hev-socks5-server/main.yml"
sed -i 's/^#auth:/auth:/; s/^# file: conf\/auth.txt/ file: \/root\/hev.creds/' /etc/hev-socks5-server/main.yml
2026-10-03 08:19:10 +02:00
PASSWORD=$(random_password 21)
2026-01-19 13:36:59 +01:00
echo "admin $PASSWORD 0" >/root/hev.creds
msg_ok "Setup hev-socks5-server"
2025-02-23 18:44:04 +01:00
msg_info "Creating Service"
2026-01-19 13:36:59 +01:00
cat <<EOF >/etc/systemd/system/hev-socks5-server.service
2025-02-23 18:44:04 +01:00
[Unit]
2026-01-19 13:36:59 +01:00
Description=hev-socks5-server Service
2025-02-23 18:44:04 +01:00
After=network.target
[Service]
2026-01-19 13:36:59 +01:00
ExecStart=/opt/hev-socks5-server /etc/hev-socks5-server/main.yml
2025-02-23 18:44:04 +01:00
Restart=always
[Install]
WantedBy=multi-user.target
EOF
2026-01-19 13:36:59 +01:00
systemctl enable -q --now hev-socks5-server
2025-02-23 18:44:04 +01:00
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc