mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
initial build
This commit is contained in:
44
flaresolverr/CHANGELOG.md
Normal file
44
flaresolverr/CHANGELOG.md
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
## 2.6.10 (20-12-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
- Switch from "master" to "latest"
|
||||
|
||||
## 2.6.9 (18-12-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
- New standardized logic for Dockerfile build and packages installation
|
||||
|
||||
## 2.5.12 (08-11-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.5.10 (02-11-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.5.8 (31-10-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.4.12 (14-10-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.4.9 (30-09-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.4.8 (16-09-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.4.6 (15-09-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.4.3 (03-09-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 2.4.2 (31-08-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
- Allow custom mailer options thanks @Poudenes
|
||||
- Allow connecting external db thanks @Poudenes
|
||||
|
||||
## 2.4.3 (29-08-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
|
||||
## 12.3.1 (28-08-2021)
|
||||
- Update to latest version from laurent22/joplin
|
||||
- Initial release
|
||||
82
flaresolverr/Dockerfile
Normal file
82
flaresolverr/Dockerfile
Normal file
@@ -0,0 +1,82 @@
|
||||
#==========================#
|
||||
# ALEXBELGIUM'S DOCKERFILE #
|
||||
#==========================#
|
||||
# _.------.
|
||||
# _.-` ('>.-`"""-.
|
||||
# '.--'` _'` _ .--.)
|
||||
# -' '-.-';` `
|
||||
# ' - _.' ``'--.
|
||||
# '---` .-'""`
|
||||
# /`
|
||||
|
||||
#################
|
||||
# 1 Build Image #
|
||||
#################
|
||||
ARG BUILD_FROM
|
||||
ARG BUILD_VERSION
|
||||
FROM flaresolverr/flaresolverr:latest
|
||||
|
||||
##################
|
||||
# 2 Modify Image #
|
||||
##################
|
||||
|
||||
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
|
||||
# Add rootfs
|
||||
COPY rootfs/ /
|
||||
|
||||
# Manual apps
|
||||
ENV PACKAGES=""
|
||||
|
||||
# Automatic apps & bashio
|
||||
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \
|
||||
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \
|
||||
curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \
|
||||
chmod 777 /automatic_packages.sh && \
|
||||
/automatic_packages.sh "${PACKAGES:-}" && \
|
||||
rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
|
||||
|
||||
|
||||
################
|
||||
# 4 Entrypoint #
|
||||
################
|
||||
|
||||
RUN chmod 777 /entrypoint.sh
|
||||
ENTRYPOINT [ "/usr/bin/env" ]
|
||||
CMD [ "/entrypoint.sh" ]
|
||||
#WORKDIR /
|
||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
############
|
||||
# 5 Labels #
|
||||
############
|
||||
|
||||
ARG BUILD_ARCH
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_DESCRIPTION
|
||||
ARG BUILD_NAME
|
||||
ARG BUILD_REF
|
||||
ARG BUILD_REPOSITORY
|
||||
ARG BUILD_VERSION
|
||||
LABEL \
|
||||
io.hass.name="${BUILD_NAME}" \
|
||||
io.hass.description="${BUILD_DESCRIPTION}" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION} \
|
||||
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
||||
org.opencontainers.image.title="${BUILD_NAME}" \
|
||||
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
||||
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
||||
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
||||
org.opencontainers.image.licenses="MIT" \
|
||||
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
||||
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
||||
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
||||
org.opencontainers.image.created=${BUILD_DATE} \
|
||||
org.opencontainers.image.revision=${BUILD_REF} \
|
||||
org.opencontainers.image.version=${BUILD_VERSION}
|
||||
52
flaresolverr/README.md
Normal file
52
flaresolverr/README.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Home assistant add-on: Flaresolver
|
||||
|
||||
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||
|
||||
[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white
|
||||
|
||||
![Supports
|
||||
Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield]
|
||||
|
||||
_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_
|
||||
|
||||
[](https://github.com/alexbelgium/hassio-addons/stargazers)
|
||||
|
||||
## About
|
||||
|
||||
FlareSolverr starts a proxy server and it waits for user requests in an idle state using few resources. When some request arrives, it uses puppeteer with the stealth plugin to create a headless browser (Firefox). It opens the URL with user parameters and waits until the Cloudflare challenge is solved (or timeout). The HTML code and the cookies are sent back to the user, and those cookies can be used to bypass Cloudflare using other HTTP clients.
|
||||
|
||||
NOTE: Web browsers consume a lot of memory. If you are running FlareSolverr on a machine with few RAM, do not make many requests at once. With each request a new browser is launched.
|
||||
|
||||
Project homepage : https://github.com/FlareSolverr/FlareSolverr
|
||||
|
||||
Based on the docker image : https://hub.docker.com/r/flaresolverr/flaresolverr
|
||||
|
||||
## Configuration
|
||||
|
||||
Webui can be found at <http://your-ip:port>
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in
|
||||
comparison to installing any other Hass.io add-on.
|
||||
|
||||
1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance.
|
||||
1. Install this add-on.
|
||||
1. Click the `Save` button to store your configuration.
|
||||
1. Start the add-on.
|
||||
1. Check the logs of the add-on to see if everything went well.
|
||||
1. Carefully configure the add-on to your preferences, see the official documentation for for that.
|
||||
|
||||
## Support
|
||||
|
||||
Create an issue on github
|
||||
|
||||
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||
[smb-shield]: https://img.shields.io/badge/smb-yes-green.svg
|
||||
[openvpn-shield]: https://img.shields.io/badge/openvpn-yes-green.svg
|
||||
[ingress-shield]: https://img.shields.io/badge/ingress-yes-green.svg
|
||||
[ssl-shield]: https://img.shields.io/badge/ssl-yes-green.svg
|
||||
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
|
||||
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
|
||||
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
|
||||
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
|
||||
49
flaresolverr/apparmor.txt
Normal file
49
flaresolverr/apparmor.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile joplin flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
|
||||
capability,
|
||||
file,
|
||||
mount,
|
||||
umount,
|
||||
remount,
|
||||
|
||||
capability setgid,
|
||||
capability setuid,
|
||||
capability sys_admin,
|
||||
capability dac_read_search,
|
||||
capability dac_override,
|
||||
capability sys_rawio,
|
||||
|
||||
# S6-Overlay
|
||||
/bin/** ix,
|
||||
/usr/bin/** ix,
|
||||
/usr/lib/bashio/** ix,
|
||||
/etc/s6/** rix,
|
||||
/run/s6/** rix,
|
||||
/etc/services.d/** rwix,
|
||||
/etc/cont-init.d/** rwix,
|
||||
/etc/cont-finish.d/** rwix,
|
||||
/init rix,
|
||||
/var/run/** mrwkl,
|
||||
/var/run/ mrwkl,
|
||||
/dev/i2c-1 mrwkl,
|
||||
# Files required
|
||||
/dev/sda1 mrwkl,
|
||||
/dev/sdb1 mrwkl,
|
||||
/dev/mmcblk0p1 mrwkl,
|
||||
/dev/ttyUSB0 mrwkl,
|
||||
/dev/* mrwkl,
|
||||
/tmp/** mrkwl,
|
||||
|
||||
# Data access
|
||||
/data/** rw,
|
||||
|
||||
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
||||
ptrace (trace,read) peer=docker-default,
|
||||
|
||||
# docker daemon confinement requires explict allow rule for signal
|
||||
signal (receive) set=(kill,term) peer=/usr/bin/docker,
|
||||
|
||||
}
|
||||
20
flaresolverr/config.json
Normal file
20
flaresolverr/config.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "FlareSolverr",
|
||||
"version": "2.1.0",
|
||||
"upstream": "2.1.0",
|
||||
"slug": "flaresolverr",
|
||||
"description": "Proxy server to bypass Cloudflare protection ",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"webui": "[PROTO:ssl]://[HOST]:[PORT:8191]",
|
||||
"ports": {
|
||||
"8191/tcp": 8191
|
||||
},
|
||||
"apparmor": true,
|
||||
"ports_description": {
|
||||
"8191/tcp": "Web interface"
|
||||
},
|
||||
"environment": {},
|
||||
"options": {},
|
||||
"schema": {},
|
||||
"arch": ["aarch64", "amd64", "armhf", "armv7"]
|
||||
}
|
||||
BIN
flaresolverr/icon.png
Normal file
BIN
flaresolverr/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
BIN
flaresolverr/logo.png
Normal file
BIN
flaresolverr/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
16
flaresolverr/rootfs/entrypoint.sh
Normal file
16
flaresolverr/rootfs/entrypoint.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting..."
|
||||
|
||||
####################
|
||||
# Starting scripts #
|
||||
####################
|
||||
|
||||
for SCRIPTS in /scripts/*; do
|
||||
[ -e "$SCRIPTS" ] || continue
|
||||
echo "$SCRIPTS: executing"
|
||||
chown $(id -u):$(id -g) $SCRIPTS
|
||||
chmod a+x $SCRIPTS
|
||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' $SCRIPTS || true
|
||||
/./$SCRIPTS || echo "$SCRIPTS: exiting $?"
|
||||
done
|
||||
18
flaresolverr/rootfs/scripts/00-aaa_dockerfile_backup.sh
Normal file
18
flaresolverr/rootfs/scripts/00-aaa_dockerfile_backup.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# If dockerfile failed install manually
|
||||
if [ -e "/ENVFILE" ]; then
|
||||
echo "Executing script"
|
||||
PACKAGES=$(</ENVFILE)
|
||||
(
|
||||
#######################
|
||||
# Automatic installer #
|
||||
#######################
|
||||
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi &&
|
||||
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi &&
|
||||
curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh &&
|
||||
chmod 777 /automatic_packages.sh &&
|
||||
eval /./automatic_packages.sh "$PACKAGES" &&
|
||||
rm /automatic_packages.sh
|
||||
) >/dev/null
|
||||
|
||||
fi
|
||||
39
flaresolverr/rootfs/scripts/00-banner.sh
Normal file
39
flaresolverr/rootfs/scripts/00-banner.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Displays a simple add-on banner on startup
|
||||
# ==============================================================================
|
||||
|
||||
if bashio::supervisor.ping; then
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
bashio::log.blue " Add-on: $(bashio::addon.name)"
|
||||
bashio::log.blue " $(bashio::addon.description)"
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
|
||||
bashio::log.blue " Add-on version: $(bashio::addon.version)"
|
||||
if bashio::var.true "$(bashio::addon.update_available)"; then
|
||||
bashio::log.magenta ' There is an update available for this add-on!'
|
||||
bashio::log.magenta \
|
||||
" Latest add-on version: $(bashio::addon.version_latest)"
|
||||
bashio::log.magenta ' Please consider upgrading as soon as possible.'
|
||||
else
|
||||
bashio::log.green ' You are running the latest version of this add-on.'
|
||||
fi
|
||||
|
||||
bashio::log.blue " System: $(bashio::info.operating_system)" \
|
||||
" ($(bashio::info.arch) / $(bashio::info.machine))"
|
||||
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)"
|
||||
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)"
|
||||
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
bashio::log.blue \
|
||||
' Please, share the above information when looking for help'
|
||||
bashio::log.blue \
|
||||
' or support in, e.g., GitHub, forums'
|
||||
bashio::log.green \
|
||||
' https://github.com/alexbelgium/hassio-addons'
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
fi
|
||||
9
flaresolverr/rootfs/scripts/99-run.sh
Normal file
9
flaresolverr/rootfs/scripts/99-run.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bashio
|
||||
|
||||
bashio::log.warning "Warning - minimum configuration recommended : 2 cpu cores and 4 GB of memory. Otherwise the system will become unresponsive and crash."
|
||||
|
||||
##############
|
||||
# LAUNCH APP #
|
||||
##############
|
||||
|
||||
node ./dist/server.js
|
||||
Reference in New Issue
Block a user