mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-04 22:57:20 +02:00
Add 2 new flags
This commit is contained in:
parent
2fca458bd0
commit
0ad84b3415
@ -44,6 +44,7 @@ ENV ZEROTIER="false"
|
|||||||
|
|
||||||
ENV AUTORENEW="86400"
|
ENV AUTORENEW="86400"
|
||||||
ENV CFGUPGRADE="true"
|
ENV CFGUPGRADE="true"
|
||||||
|
ENV DB="auto"
|
||||||
ENV DOCKER="true"
|
ENV DOCKER="true"
|
||||||
ENV EARLYRENEW="30"
|
ENV EARLYRENEW="30"
|
||||||
ENV FASTGEOIP="false"
|
ENV FASTGEOIP="false"
|
||||||
@ -52,6 +53,7 @@ ENV MDNSNAME="''"
|
|||||||
ENV NOAUTH="false"
|
ENV NOAUTH="false"
|
||||||
ENV PORT="8000"
|
ENV PORT="8000"
|
||||||
ENV SSHLB="false"
|
ENV SSHLB="false"
|
||||||
|
ENV UPDATE_GEOIP="false"
|
||||||
ENV VERSION="false"
|
ENV VERSION="false"
|
||||||
ENV WEBFM="true"
|
ENV WEBFM="true"
|
||||||
ENV WEBROOT="./www"
|
ENV WEBROOT="./www"
|
||||||
|
@ -73,6 +73,7 @@ Variables are the same as those in [Start Parameters](https://github.com/tobychu
|
|||||||
|:-|:-|:-|
|
|:-|:-|:-|
|
||||||
| `AUTORENEW` | `86400` (Integer) | ACME auto TLS/SSL certificate renew check interval. |
|
| `AUTORENEW` | `86400` (Integer) | ACME auto TLS/SSL certificate renew check interval. |
|
||||||
| `CFGUPGRADE` | `true` (Boolean) | Enable auto config upgrade if breaking change is detected. |
|
| `CFGUPGRADE` | `true` (Boolean) | Enable auto config upgrade if breaking change is detected. |
|
||||||
|
| `DB` | `auto` (String) | Database backend to use (leveldb, boltdb, auto) Note that fsdb will be used on unsupported platforms like RISCV (default "auto"). |
|
||||||
| `DOCKER` | `true` (Boolean) | Run Zoraxy in docker compatibility mode. |
|
| `DOCKER` | `true` (Boolean) | Run Zoraxy in docker compatibility mode. |
|
||||||
| `EARLYRENEW` | `30` (Integer) | Number of days to early renew a soon expiring certificate. |
|
| `EARLYRENEW` | `30` (Integer) | Number of days to early renew a soon expiring certificate. |
|
||||||
| `FASTGEOIP` | `false` (Boolean) | Enable high speed geoip lookup, require 1GB extra memory (Not recommend for low end devices). |
|
| `FASTGEOIP` | `false` (Boolean) | Enable high speed geoip lookup, require 1GB extra memory (Not recommend for low end devices). |
|
||||||
@ -81,6 +82,7 @@ Variables are the same as those in [Start Parameters](https://github.com/tobychu
|
|||||||
| `NOAUTH` | `false` (Boolean) | Disable authentication for management interface. |
|
| `NOAUTH` | `false` (Boolean) | Disable authentication for management interface. |
|
||||||
| `PORT` | `8000` (Integer) | Management web interface listening port |
|
| `PORT` | `8000` (Integer) | Management web interface listening port |
|
||||||
| `SSHLB` | `false` (Boolean) | Allow loopback web ssh connection (DANGER). |
|
| `SSHLB` | `false` (Boolean) | Allow loopback web ssh connection (DANGER). |
|
||||||
|
| `UPDATE_GEOIP` | `false` (Boolean) | Download the latest GeoIP data and exit. |
|
||||||
| `VERSION` | `false` (Boolean) | Show version of this server. |
|
| `VERSION` | `false` (Boolean) | Show version of this server. |
|
||||||
| `WEBFM` | `true` (Boolean) | Enable web file manager for static web server root folder. |
|
| `WEBFM` | `true` (Boolean) | Enable web file manager for static web server root folder. |
|
||||||
| `WEBROOT` | `./www` (String) | Static web server root folder. Only allow change in start parameters. |
|
| `WEBROOT` | `./www` (String) | Static web server root folder. Only allow change in start parameters. |
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
echo "CA certificates updated"
|
echo "CA certificates updated."
|
||||||
|
|
||||||
|
zoraxy -update_geoip=true
|
||||||
|
echo "Updated GeoIP data."
|
||||||
|
|
||||||
if [ "$ZEROTIER" = "true" ]; then
|
if [ "$ZEROTIER" = "true" ]; then
|
||||||
if [ ! -d "/opt/zoraxy/config/zerotier/" ]; then
|
if [ ! -d "/opt/zoraxy/config/zerotier/" ]; then
|
||||||
@ -9,13 +12,14 @@ if [ "$ZEROTIER" = "true" ]; then
|
|||||||
fi
|
fi
|
||||||
ln -s /opt/zoraxy/config/zerotier/ /var/lib/zerotier-one
|
ln -s /opt/zoraxy/config/zerotier/ /var/lib/zerotier-one
|
||||||
zerotier-one -d
|
zerotier-one -d
|
||||||
echo "ZeroTier daemon started"
|
echo "ZeroTier daemon started."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Zoraxy..."
|
echo "Starting Zoraxy..."
|
||||||
exec zoraxy \
|
exec zoraxy \
|
||||||
-autorenew="$AUTORENEW" \
|
-autorenew="$AUTORENEW" \
|
||||||
-cfgupgrade="$CFGUPGRADE" \
|
-cfgupgrade="$CFGUPGRADE" \
|
||||||
|
-db="$DB" \
|
||||||
-docker="$DOCKER" \
|
-docker="$DOCKER" \
|
||||||
-earlyrenew="$EARLYRENEW" \
|
-earlyrenew="$EARLYRENEW" \
|
||||||
-fastgeoip="$FASTGEOIP" \
|
-fastgeoip="$FASTGEOIP" \
|
||||||
@ -24,6 +28,7 @@ exec zoraxy \
|
|||||||
-noauth="$NOAUTH" \
|
-noauth="$NOAUTH" \
|
||||||
-port=:"$PORT" \
|
-port=:"$PORT" \
|
||||||
-sshlb="$SSHLB" \
|
-sshlb="$SSHLB" \
|
||||||
|
-update_geoip="$UPDATE_GEOIP" \
|
||||||
-version="$VERSION" \
|
-version="$VERSION" \
|
||||||
-webfm="$WEBFM" \
|
-webfm="$WEBFM" \
|
||||||
-webroot="$WEBROOT" \
|
-webroot="$WEBROOT" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user