mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "55c8d1187bb1c8655b7a939a48cf2e982a431cdd" and "64eab60a4cfad9b1acf868691451a5ab0aff8fe6" have entirely different histories.
55c8d1187b
...
64eab60a4c
|
@ -13,14 +13,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||||
|
|
||||||
## 2024-10-25
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- **Zoraxy LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/468a5d367ded4cf453a1507452e112ac3e234e2a)
|
|
||||||
- Switch built from source to a pre-compiled binary version.
|
|
||||||
- Breaking Change
|
|
||||||
|
|
||||||
## 2024-10-23
|
## 2024-10-23
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
34
ct/zoraxy.sh
34
ct/zoraxy.sh
|
@ -20,7 +20,7 @@ header_info
|
||||||
echo -e "Loading..."
|
echo -e "Loading..."
|
||||||
APP="Zoraxy"
|
APP="Zoraxy"
|
||||||
var_disk="6"
|
var_disk="6"
|
||||||
var_cpu="2"
|
var_cpu="4"
|
||||||
var_ram="2048"
|
var_ram="2048"
|
||||||
var_os="debian"
|
var_os="debian"
|
||||||
var_version="12"
|
var_version="12"
|
||||||
|
@ -54,28 +54,30 @@ function default_settings() {
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
msg_info "Updating $APP"
|
||||||
msg_info "Updating $APP to ${RELEASE}"
|
systemctl stop zoraxy
|
||||||
systemctl stop zoraxy
|
cd /opt/zoraxy/src
|
||||||
wget -q "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_amd64"
|
systemctl stop zoraxy
|
||||||
rm /opt/zoraxy/zoraxy
|
if git pull | grep -q 'Already up to date.'; then
|
||||||
mv zoraxy_linux_amd64 /opt/zoraxy/zoraxy
|
msg_ok "Already up to date. No update required."
|
||||||
chmod +x /opt/zoraxy/zoraxy
|
|
||||||
systemctl start zoraxy
|
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
|
||||||
msg_ok "Updated $APP"
|
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
go mod tidy
|
||||||
fi
|
go build
|
||||||
exit
|
msg_ok "Updated $APP"
|
||||||
|
fi
|
||||||
|
systemctl start zoraxy
|
||||||
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
build_container
|
build_container
|
||||||
description
|
description
|
||||||
|
|
||||||
|
msg_info "Setting Container to Normal Resources"
|
||||||
|
pct set $CTID -cores 2
|
||||||
|
msg_ok "Set Container to Normal Resources"
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
echo -e "${APP} should be reachable by going to the following URL.
|
||||||
${BL}http://${IP}:8000${CL} \n"
|
${BL}http://${IP}:8000${CL} \n"
|
||||||
|
|
|
@ -41,6 +41,7 @@ $STD apt-get install -y --no-install-recommends \
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Python3 Dependencies (Patience)"
|
msg_info "Installing Python3 Dependencies (Patience)"
|
||||||
|
$STD python3 -m nltk.downloader all
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y --no-install-recommends \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
|
|
|
@ -17,16 +17,23 @@ msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y curl
|
||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
|
$STD apt-get install -y git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Golang"
|
||||||
|
set +o pipefail
|
||||||
|
RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1)
|
||||||
|
wget -q https://golang.org/dl/$RELEASE
|
||||||
|
$STD tar -xzf $RELEASE -C /usr/local
|
||||||
|
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
|
||||||
|
set -o pipefail
|
||||||
|
msg_ok "Installed Golang"
|
||||||
|
|
||||||
msg_info "Installing Zoraxy (Patience)"
|
msg_info "Installing Zoraxy (Patience)"
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
$STD git clone https://github.com/tobychui/zoraxy /opt/zoraxy
|
||||||
wget -q "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_amd64"
|
cd /opt/zoraxy/src
|
||||||
mkdir -p /opt/zoraxy
|
$STD go mod tidy
|
||||||
mv zoraxy_linux_amd64 /opt/zoraxy/zoraxy
|
$STD go build
|
||||||
chmod +x /opt/zoraxy/zoraxy
|
|
||||||
ln -s /opt/zoraxy/zoraxy /usr/local/bin/zoraxy
|
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
|
||||||
msg_ok "Installed Zoraxy"
|
msg_ok "Installed Zoraxy"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
@ -36,8 +43,8 @@ Description=General purpose request proxy and forwarding tool
|
||||||
After=syslog.target network-online.target
|
After=syslog.target network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/opt/zoraxy/./zoraxy
|
ExecStart=/opt/zoraxy/src/./zoraxy
|
||||||
WorkingDirectory=/opt/zoraxy/
|
WorkingDirectory=/opt/zoraxy/src/
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -50,6 +57,7 @@ motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
|
rm -rf $RELEASE
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|
Loading…
Reference in New Issue