add ci script
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user