Skip to content

Commit

Permalink
docker: changed default config to use local blacklists
Browse files Browse the repository at this point in the history
  • Loading branch information
luisguillenc committed Dec 11, 2020
1 parent fbb0ffb commit 90bd6e6
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 22 deletions.
6 changes: 4 additions & 2 deletions Dockerfile.xlget
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ RUN adduser -D -g 'luids' luxlist \
&& mkdir -p /var/lib/luids/xlist/status \
&& mkdir -p /var/lib/luids/xlist/local \
&& mkdir -p /var/cache/luids/xlist \
&& touch /var/lib/luids/xlist/.keep \
&& touch /var/lib/luids/xlist/status/.keep \
&& touch /var/lib/luids/xlist/local/whitelist.xlist \
&& touch /var/lib/luids/xlist/local/blacklist.xlist \
&& touch /var/cache/luids/xlist/.keep \
&& chown -R luxlist /var/lib/luids/xlist \
&& chown -R luxlist /var/cache/luids/xlist
Expand All @@ -39,7 +41,7 @@ COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build-env /etc/passwd /etc/passwd

COPY --from=build-env /app/bin/xlget /bin/
COPY --from=build-env /app/configs/docker/xlistd/* /etc/luids/xlist/
COPY --from=build-env /app/configs/docker/xlist/* /etc/luids/xlist/
COPY --from=build-env /var/lib/luids /var/lib/luids
COPY --from=build-env /var/cache/luids /var/cache/luids

Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.xlistd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ RUN apk update && apk add --no-cache git make ca-certificates && update-ca-certi
RUN adduser -D -g 'luids' luxlist \
&& mkdir -p /var/lib/luids/xlist/status \
&& mkdir -p /var/lib/luids/xlist/local \
&& touch /var/lib/luids/xlist/.keep \
&& touch /var/lib/luids/xlist/status/.keep \
&& touch /var/lib/luids/xlist/local/whitelist.xlist \
&& touch /var/lib/luids/xlist/local/blacklist.xlist \
&& chown -R luxlist /var/lib/luids/xlist

WORKDIR /app
Expand All @@ -36,7 +38,7 @@ COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build-env /etc/passwd /etc/passwd

COPY --from=build-env /app/bin/xlist? /bin/
COPY --from=build-env /app/configs/docker/xlistd/* /etc/luids/xlist/
COPY --from=build-env /app/configs/docker/xlist/* /etc/luids/xlist/
COPY --from=build-env /var/lib/luids /var/lib/luids

USER luxlist
Expand Down
6 changes: 0 additions & 6 deletions configs/docker/xlget/xlget.toml

This file was deleted.

30 changes: 30 additions & 0 deletions configs/docker/xlist/service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"id": "root",
"class": "wbefore",
"resources": [ "ip4", "ip6", "domain" ],
"contains": [
{
"id": "local-whitelist",
"class": "file",
"resources": [ "ip4", "ip6", "domain" ],
"source": "local/whitelist.xlist",
"opts": {
"autoreload": true,
"reloadseconds": 5
}
},
{
"id": "local-blacklist",
"class": "file",
"resources": [ "ip4", "ip6", "domain" ],
"source": "local/blacklist.xlist",
"opts": {
"autoreload": true,
"reloadseconds": 5,
"reason": "found in 'local-blacklist'"
}
}
]
}
]
File renamed without changes.
7 changes: 7 additions & 0 deletions configs/docker/xlist/xlget.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[xlget]
outputdir = "/var/lib/luids/xlist"
cachedir = "/var/cache/luids/xlist"
statusdir = "/var/lib/luids/xlist/status"

[xlget.source]
files = [ "/etc/luids/xlist/sources.json" ]
File renamed without changes.
12 changes: 0 additions & 12 deletions configs/docker/xlistd/service.json

This file was deleted.

0 comments on commit 90bd6e6

Please sign in to comment.