mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-06 18:22:58 +02:00
Compare commits
7 Commits
add-script
...
feat/apt-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a53db68d00 | ||
|
|
8680bd2459 | ||
|
|
ca7811fd1a | ||
|
|
59eed2646c | ||
|
|
9789c46e20 | ||
|
|
f2861e108b | ||
|
|
9a259a96cc |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -429,6 +429,18 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-04-01
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- DrawDB ([#13454](https://github.com/community-scripts/ProxmoxVE/pull/13454))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Filebrowser: make noauth setup use correct database [@MickLesk](https://github.com/MickLesk) ([#13457](https://github.com/community-scripts/ProxmoxVE/pull/13457))
|
||||
|
||||
## 2026-03-31
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
6
ct/headers/drawdb
Normal file
6
ct/headers/drawdb
Normal file
@@ -0,0 +1,6 @@
|
||||
____ ____ ____
|
||||
/ __ \_________ __ __/ __ \/ __ )
|
||||
/ / / / ___/ __ `/ | /| / / / / / __ |
|
||||
/ /_/ / / / /_/ /| |/ |/ / /_/ / /_/ /
|
||||
/_____/_/ \__,_/ |__/|__/_____/_____/
|
||||
|
||||
@@ -986,13 +986,23 @@ base_settings() {
|
||||
|
||||
# Runtime check: Verify APT cacher is reachable if configured
|
||||
if [[ -n "$APT_CACHER_IP" && "$APT_CACHER" == "yes" ]]; then
|
||||
if ! curl -s --connect-timeout 2 "http://${APT_CACHER_IP}:3142" >/dev/null 2>&1; then
|
||||
msg_warn "APT Cacher configured but not reachable at ${APT_CACHER_IP}:3142"
|
||||
local _check_host _check_port _check_url
|
||||
_check_host=$(echo "$APT_CACHER_IP" | sed -e 's|https\?://||' -e 's|/.*||' | cut -d: -f1)
|
||||
_check_port=$(echo "$APT_CACHER_IP" | sed -e 's|https\?://||' -e 's|/.*||' | cut -s -d: -f2)
|
||||
if [[ "$APT_CACHER_IP" =~ ^https?:// ]]; then
|
||||
_check_url="$APT_CACHER_IP"
|
||||
_check_port="${_check_port:-80}"
|
||||
else
|
||||
_check_port="${_check_port:-3142}"
|
||||
_check_url="http://${APT_CACHER_IP}:${_check_port}"
|
||||
fi
|
||||
if ! curl -s --connect-timeout 2 "${_check_url}" >/dev/null 2>&1; then
|
||||
msg_warn "APT Cacher configured but not reachable at ${_check_url}"
|
||||
msg_custom "⚠️" "${YW}" "Disabling APT Cacher for this installation"
|
||||
APT_CACHER=""
|
||||
APT_CACHER_IP=""
|
||||
else
|
||||
msg_ok "APT Cacher verified at ${APT_CACHER_IP}:3142"
|
||||
msg_ok "APT Cacher verified at ${_check_url}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1199,6 +1209,13 @@ load_vars_file() {
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
var_apt_cacher_ip)
|
||||
# Allow: plain IP/hostname, http://host, https://host:port
|
||||
if [[ -n "$var_val" ]] && ! [[ "$var_val" =~ ^(https?://)?[a-zA-Z0-9._-]+(:[0-9]+)?(/.*)?$ ]]; then
|
||||
msg_warn "Invalid APT Cacher address '$var_val' in $file, ignoring"
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
var_container_storage | var_template_storage)
|
||||
# Validate that the storage exists and is active on the current node
|
||||
local _storage_status
|
||||
@@ -1311,9 +1328,11 @@ var_ipv6_method=none
|
||||
var_ssh=no
|
||||
# var_ssh_authorized_key=
|
||||
|
||||
# APT cacher (optional - with example)
|
||||
# APT cacher (optional - IP or URL)
|
||||
# var_apt_cacher=yes
|
||||
# var_apt_cacher_ip=192.168.1.10
|
||||
# var_apt_cacher_ip=http://proxy.local
|
||||
# var_apt_cacher_ip=https://proxy.local:443
|
||||
|
||||
# Features/Tags/verbosity
|
||||
var_fuse=no
|
||||
@@ -2526,7 +2545,7 @@ advanced_settings() {
|
||||
# Ask for IP if enabled
|
||||
if result=$(whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||
--title "APT CACHER IP" \
|
||||
--inputbox "\nEnter APT Cacher-NG server IP address:" 10 58 "$_apt_cacher_ip" \
|
||||
--inputbox "\nEnter APT Cacher-NG IP or URL:\n(e.g. 192.168.1.10, http://host, https://host:443)" 12 62 "$_apt_cacher_ip" \
|
||||
3>&1 1>&2 2>&3); then
|
||||
_apt_cacher_ip="$result"
|
||||
fi
|
||||
|
||||
@@ -390,10 +390,24 @@ update_os() {
|
||||
msg_info "Updating Container OS"
|
||||
if [[ "$CACHER" == "yes" ]]; then
|
||||
echo 'Acquire::http::Proxy-Auto-Detect "/usr/local/bin/apt-proxy-detect.sh";' >/etc/apt/apt.conf.d/00aptproxy
|
||||
local _proxy_raw="${CACHER_IP}"
|
||||
local _proxy_host _proxy_port _proxy_url
|
||||
# Parse host and port from URL or plain IP/hostname
|
||||
_proxy_host=$(echo "$_proxy_raw" | sed -e 's|https\?://||' -e 's|/.*||' | cut -d: -f1)
|
||||
_proxy_port=$(echo "$_proxy_raw" | sed -e 's|https\?://||' -e 's|/.*||' | cut -s -d: -f2)
|
||||
if [[ "$_proxy_raw" =~ ^https?:// ]]; then
|
||||
# Full URL provided — use as-is for proxy output, extract port for nc check
|
||||
_proxy_url="$_proxy_raw"
|
||||
_proxy_port="${_proxy_port:-80}"
|
||||
else
|
||||
# Legacy: plain IP or hostname — default to http + port 3142
|
||||
_proxy_port="${_proxy_port:-3142}"
|
||||
_proxy_url="http://${_proxy_raw}:${_proxy_port}"
|
||||
fi
|
||||
cat <<EOF >/usr/local/bin/apt-proxy-detect.sh
|
||||
#!/bin/bash
|
||||
if nc -w1 -z "${CACHER_IP}" 3142; then
|
||||
echo -n "http://${CACHER_IP}:3142"
|
||||
if nc -w1 -z "${_proxy_host}" ${_proxy_port}; then
|
||||
echo -n "${_proxy_url}"
|
||||
else
|
||||
echo -n "DIRECT"
|
||||
fi
|
||||
|
||||
@@ -131,9 +131,10 @@ if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
cd /usr/local/community-scripts
|
||||
filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null
|
||||
filebrowser config init --auth.method=noauth &>/dev/null
|
||||
filebrowser config set --auth.method=noauth &>/dev/null
|
||||
filebrowser users add ID 1 --perm.admin &>/dev/null
|
||||
filebrowser config set --auth.method=noauth --database "$DB_PATH" &>/dev/null
|
||||
if ! filebrowser users update 1 --perm.admin --database "$DB_PATH" &>/dev/null; then
|
||||
filebrowser users add admin community-scripts.org --perm.admin --database "$DB_PATH" &>/dev/null
|
||||
fi
|
||||
msg_ok "No Authentication configured"
|
||||
else
|
||||
msg_info "Setting up default authentication"
|
||||
|
||||
Reference in New Issue
Block a user