From 60f8d9f25791c770dcea800cee3dc1cc12dfa9d9 Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 16 Aug 2024 15:18:23 +0800 Subject: [PATCH] update outline-ss-server --- outline-ss-server/Dockerfile | 4 ++-- outline-ss-server/data/update.sh | 11 +++++++++++ outline-ss-server/systemd/outline-ss-server.service | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 outline-ss-server/data/update.sh diff --git a/outline-ss-server/Dockerfile b/outline-ss-server/Dockerfile index ee197bf..9ee9a9d 100644 --- a/outline-ss-server/Dockerfile +++ b/outline-ss-server/Dockerfile @@ -11,11 +11,11 @@ ARG OUTLINE_SS_SERVER_ARCH=x86_64 ARG OUTLINE_SS_SERVER_FILE=outline-ss-server_${OUTLINE_SS_SERVER_VERSION}_${OUTLINE_SS_SERVER_OS}_${OUTLINE_SS_SERVER_ARCH}.tar.gz ARG OUTLINE_SS_SERVER_URL=https://github.com/Jigsaw-Code/outline-ss-server/releases/download/v${OUTLINE_SS_SERVER_VERSION}/${OUTLINE_SS_SERVER_FILE} -ARG IP_ASN_MMDB_VERSION=2024-07 +ARG IP_ASN_MMDB_VERSION=2024-08 ARG IP_ASN_MMDB_URL=https://download.db-ip.com/free/dbip-asn-lite-${IP_ASN_MMDB_VERSION}.mmdb.gz ARG IP_ASN_MMDB_FILE=ip-asn.mmdb -ARG IP_COUNTRY_MMDB_VERSION=2024-07 +ARG IP_COUNTRY_MMDB_VERSION=2024-08 ARG IP_COUNTRY_MMDB_URL=https://download.db-ip.com/free/dbip-country-lite-${IP_COUNTRY_MMDB_VERSION}.mmdb.gz ARG IP_COUNTRY_MMDB_FILE=ip-country.mmdb diff --git a/outline-ss-server/data/update.sh b/outline-ss-server/data/update.sh new file mode 100755 index 0000000..932afa8 --- /dev/null +++ b/outline-ss-server/data/update.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -euo pipefail + +DATE=$(date +%Y-%m) +wget -O ip-asn.mmdb.gz https://download.db-ip.com/free/dbip-asn-lite-$DATE.mmdb.gz +wget -O ip-country.mmdb.gz https://download.db-ip.com/free/dbip-country-lite-$DATE.mmdb.gz + +systemctl stop outline-ss-server +gunzip -f ip-asn.mmdb.gz ip-country.mmdb.gz +systemctl start outline-ss-server diff --git a/outline-ss-server/systemd/outline-ss-server.service b/outline-ss-server/systemd/outline-ss-server.service index 1023552..0e8fe30 100644 --- a/outline-ss-server/systemd/outline-ss-server.service +++ b/outline-ss-server/systemd/outline-ss-server.service @@ -6,8 +6,8 @@ After=network.target User=vpn Group=vpn WorkingDirectory=/etc/outline-ss-server -# https://download.db-ip.com/free/dbip-asn-lite-2024-07.mmdb.gz -# https://download.db-ip.com/free/dbip-country-lite-2024-07.mmdb.gz +# https://download.db-ip.com/free/dbip-asn-lite-$(date +%Y-%m).mmdb.gz +# https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz ExecStart=/usr/local/bin/outline-ss-server -config=config.yml \ -ip_asn_db=ip-asn.mmdb \ -ip_country_db=ip-country.mmdb \