add ci script
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
2025-04-09 12:13:05 +02:00
parent 49281a99a4
commit 0339abb442
4 changed files with 93 additions and 8 deletions

View File

@ -1,9 +1,19 @@
dnl values
define(`ALLOWED_NETWORK', esyscmd(`echo -n $ALLOWED_NETWORK'))dnl
divert(-1)
dnl === Load allowed networks from environment ===
define(`ALLOWED_NETWORKS', `esyscmd(`echo $ALLOWED_NETWORKS')')dnl
dnl === Split into tokens ===
define(`_firstword', `substr(`$1', `0', index(`$1 ', ` '))')dnl
define(`_restwords', `substr(`$1', incr(index(`$1 ', ` ')))')dnl
dnl === Recursive loop ===
define(`_foreach', `
ifelse(`$1', `', `', `
Allow $1
_foreach(_firstword(_restwords($2)), _restwords($2))')')dnl
define(`foreach', `_foreach(_firstword($1), $1)')dnl
divert
dnl --------------------------------------------------------------
dnl template for tinyproxy.conf
Port 3128
Listen 0.0.0.0
@ -13,9 +23,8 @@ Group nobody
LogLevel Info
Allow ALLOWED_NETWORK
foreach(ALLOWED_NETWORKS)
ConnectPort 443
Timeout 600