This script still works, it will have to be adapted to your debian install and needs apt-cash-ng install on another computer.

This script i use as referance only.


bash sparkylinux 5.xx install apt-cash server proxy
#!/bin/bash
# this script install a Proxy for sparkylinux 5.xx for apt-cash server
# klein
# sudo nano /etc/apt/apt.conf.d/02proxy
# Acquire::http::Proxy 'http://192.168.1.157:3142';
# date= 03/11/20
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/mysbin
proxy.sys(){
	if [ ! -f /etc/apt/apt.conf.d/02proxy ]; then
		# file does not exist (0=OK)
		echo "one "
		touch /etc/apt/apt.conf.d/02proxy
		echo "Acquire::http::Proxy \"http://192.168.1.157:3142\";" >> /etc/apt/apt.conf.d/02proxy && proxy.sys
		exit 0
	else
		# file does exist (1=WARN)
		paths=/etc/apt/sources.list.d/sparky.list
		sudo cp -r /etc/apt/sources.list /etc/apt/sources.list.org
		sudo mv $paths /etc/apt/sparky.list.org
		touch $paths
		echo "   " >> $paths
		echo "### sparky core repository is used by all sparky editions" >> $paths
		echo "deb http://HTTPS///repo.sparkylinux.org/ core main" >> $paths 
		echo "deb-src http://HTTPS///repo.sparkylinux.org/ core main " >> $paths
		echo "   " >> $paths
		echo "### sparky nibiru (stable) repository" >> $paths		
		echo "deb http://HTTPS///repo.sparkylinux.org/ nibiru main" >> $paths
		echo "deb-src http://HTTPS///repo.sparkylinux.org/ nibiru main " >> $paths 		
		echo "two"	
		echo "ready for update "
		exit 0
	fi
}

proxy.sys