55# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66# Source: https://github.com/heiher/hev-socks5-server
77
8- # Import Functions und Setup
98source /dev/stdin <<< " $FUNCTIONS_FILE_PATH"
109color
1110verb_ip6
@@ -14,39 +13,29 @@ setting_up_container
1413network_check
1514update_os
1615
17- # Installing Dependencies with the 3 core dependencies (curl;sudo;mc)
1816msg_info " Installing Dependencies"
1917$STD apt-get install -y \
2018 curl \
2119 sudo \
2220 mc
2321msg_ok " Installed Dependencies"
2422
25- # Temp
26-
27- # Setup App (build from source)
2823msg_info " Setup ${APPLICATION} "
29- RELEASE=$( curl -s https://api.github.com/repos/heiher/hev-socks5-server /releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
30- curl -L -o " ${APPLICATION} " " https://github.com/heiher/hev-socks5-server /releases/download/${RELEASE} /hev-socks5-server-linux-x86_64"
24+ RELEASE=$( curl -s https://api.github.com/repos/heiher/${APPLICATION} /releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
25+ curl -L -o " ${APPLICATION} " " https://github.com/heiher/${APPLICATION} /releases/download/${RELEASE} /hev-socks5-server-linux-x86_64"
3126mv ${APPLICATION} /opt/${APPLICATION}
3227chmod +x /opt/${APPLICATION}
3328echo " ${RELEASE} " > /opt/${APPLICATION} _version.txt
34-
35- # do not overwrite existing config
36- if [ ! -d " /etc/${APPLICATION} " ]; then
37- curl -L -o " main.yml" " https://raw.githubusercontent.com/heiher/hev-socks5-server/refs/heads/master/conf/main.yml"
38- sed -i ' s/^#auth:/auth:/; s/^# file: conf\/auth.txt/ file: \/root\/hev.creds/' main.yml
39- mkdir -p /etc/${APPLICATION}
40-
41- PASSWORD=$( openssl rand -base64 16)
42- USERNAME=" admin"
43- MARK=" 0"
44- echo " $USERNAME $PASSWORD $MARK " > /root/hev.creds
45- mv main.yml /etc/${APPLICATION} /main.yml
46- fi
29+ curl -L -o " main.yml" " https://raw.githubusercontent.com/heiher/${APPLICATION} /refs/heads/master/conf/main.yml"
30+ sed -i ' s/^#auth:/auth:/; s/^# file: conf\/auth.txt/ file: \/root\/hev.creds/' main.yml
31+ mkdir -p /etc/${APPLICATION}
32+ USERNAME=" admin"
33+ PASSWORD=$( openssl rand -base64 16)
34+ MARK=" 0"
35+ echo " $USERNAME $PASSWORD $MARK " > /root/hev.creds
36+ mv main.yml /etc/${APPLICATION} /main.yml
4737msg_ok " Setup ${APPLICATION} "
4838
49- # Creating Service (if needed)
5039msg_info " Creating Service"
5140cat << EOF >/etc/systemd/system/${APPLICATION} .service
5241[Unit]
@@ -66,7 +55,6 @@ msg_ok "Created Service"
6655motd_ssh
6756customize
6857
69- # Cleanup
7058msg_info " Cleaning up"
7159$STD apt-get -y autoremove
7260$STD apt-get -y autoclean
0 commit comments