1 Commits

Author SHA1 Message Date
Alexandre
476b7a02ed Add ingress support to Jackett addon 2026-01-19 16:09:21 +01:00
9 changed files with 39 additions and 30 deletions

View File

@@ -412,13 +412,12 @@ If you want to do add the repository manually, please follow the procedure highl
![aarch64][aarch64-badge]
![amd64][amd64-badge]
✓ ![image](https://api.iconify.design/mdi/cloud-search-outline.svg) [Jackett NAS](jackett/) : Translates queries from apps (Sonarr, Sickrage, CouchPotato, Mylar, etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software
✓ [Jackett NAS](jackett/) : Translates queries from apps (Sonarr, Sickrage, CouchPotato, Mylar, etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software
  ![Version](https://img.shields.io/badge/dynamic/yaml?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fjackett%2Fconfig.yaml)
![Update](https://img.shields.io/badge/dynamic/json?label=Updated&query=%24.last_update&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fjackett%2Fupdater.json)
![aarch64][aarch64-badge]
![amd64][amd64-badge]
![ingress][ingress-badge]
✓ ![image](https://api.iconify.design/mdi/billiards-rack.svg) [Jellyfin NAS](jellyfin/) : A Free Software Media System that puts you in control of managing and streaming your media
@@ -670,7 +669,6 @@ If you want to do add the repository manually, please follow the procedure highl
![Update](https://img.shields.io/badge/dynamic/json?label=Updated&query=%24.last_update&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fprowlarr%2Fupdater.json)
![aarch64][aarch64-badge]
![amd64][amd64-badge]
![ingress][ingress-badge]
✓ ![image](https://api.iconify.design/mdi/movie-outline.svg) [Radarr](radarr/) : A fork of Sonarr to work with movies like Couchpotato

View File

@@ -1,6 +1,6 @@
## 0.24.863-1 (2026-01-16)
- Add ingress support for Jackett.
- Add ingress support
## 0.24.863 (2026-01-16)
- Update to latest version from linuxserver/docker-jackett (changelog : https://github.com/linuxserver/docker-jackett/releases)

View File

@@ -55,7 +55,7 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
RUN chmod 744 /ha_automodules.sh && /ha_automodules.sh "$MODULES" && rm /ha_automodules.sh
# Manual apps
ENV PACKAGES="curl jq"
ENV PACKAGES="curl"
# Automatic apps & bashio
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"

View File

@@ -29,7 +29,7 @@ _Thanks to everyone having starred my repo! To star it click on the image below,
## About
[Jackett](https://github.com/Jackett/Jackett) works as a proxy server: it translates queries from supported apps into tracker-site-specific HTTP queries, parses the responses, and then sends results back to the requesting software.
[jackett](https://github.com/jackett/jackett) - A fork of jackett to work with movies like Couchpotato.
This addon is based on the [docker image](https://github.com/linuxserver/docker-jackett) from linuxserver.io.
@@ -47,7 +47,6 @@ Configurations can be done through the app webUI, except for the following optio
| `PGID` | int | `0` | Group ID for file permissions |
| `PUID` | int | `0` | User ID for file permissions |
| `TZ` | str | | Timezone (e.g., `Europe/London`) |
| `connection_mode` | list | `ingress_noauth` | Connection mode (ingress_noauth/noingress_auth/ingress_auth) |
| `localdisks` | str | | Local drives to mount (e.g., `sda1,sdb1,MYNAS`) |
| `networkdisks` | str | | SMB shares to mount (e.g., `//SERVER/SHARE`) |
| `cifsusername` | str | | SMB username for network shares |
@@ -60,7 +59,6 @@ Configurations can be done through the app webUI, except for the following optio
PGID: 0
PUID: 0
TZ: "Europe/London"
connection_mode: "ingress_noauth"
localdisks: "sda1,sdb1"
networkdisks: "//192.168.1.100/downloads"
cifsusername: "mediauser"
@@ -89,3 +87,4 @@ comparison to installing any other Hass.io add-on.
[repository]: https://github.com/alexbelgium/hassio-addons

View File

@@ -85,8 +85,6 @@ options:
PGID: 0
PUID: 0
connection_mode: ingress_noauth
panel_admin: false
panel_icon: mdi:cloud-search-outline
ports:
8889/tcp: 8889
9117/tcp: 9117

View File

@@ -7,7 +7,6 @@ set -e
#################
declare ingress_interface
declare ingress_port
declare ingress_entry
ingress_port=$(bashio::addon.ingress_port)
ingress_interface=$(bashio::addon.ip_address)
@@ -22,27 +21,34 @@ sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/servers/ingress.conf
# Values
slug=jackett
CONFIG_LOCATION="/config/addons_config/Jackett/ServerConfig.json"
CONFIG_LOCATION=/config/addons_config/Jackett/ServerConfig.json
if [ -f "$CONFIG_LOCATION" ]; then
# Define addon mode
connection_mode="$(bashio::config "connection_mode")"
bashio::log.green "---------------------------"
bashio::log.green "Connection_mode is $connection_mode"
bashio::log.green "---------------------------"
case "$connection_mode" in
ingress_noauth|ingress_auth)
base_path="$slug"
# Ingress mode, authentification is disabled
ingress_noauth)
bashio::log.green "Ingress is enabled, authentification is disabled"
bashio::log.yellow "WARNING : Make sure that the port is not exposed externally by your router to avoid a security risk !"
sed -i -E "s/\"BasePathOverride\"[[:space:]]*:[[:space:]]*\"[^\"]*\"/\"BasePathOverride\": \"${slug}\"/" "$CONFIG_LOCATION"
sed -i -E "s/\"AdminPassword\"[[:space:]]*:[[:space:]]*\"[^\"]*\"/\"AdminPassword\": \"\"/" "$CONFIG_LOCATION"
;;
# Ingress mode, with authentification
ingress_auth)
bashio::log.green "Ingress is enabled, and external authentification is enabled"
sed -i -E "s/\"BasePathOverride\"[[:space:]]*:[[:space:]]*\"[^\"]*\"/\"BasePathOverride\": \"${slug}\"/" "$CONFIG_LOCATION"
;;
# No ingress mode, with authentification
noingress_auth)
base_path=""
bashio::log.green "Disabling ingress and enabling authentification"
bashio::log.yellow "WARNING : Ingress is disabled so the app won't be available from HA itself !"
sed -i -E "s/\"BasePathOverride\"[[:space:]]*:[[:space:]]*\"[^\"]*\"/\"BasePathOverride\": \"\"/" "$CONFIG_LOCATION"
;;
esac
if command -v jq >/dev/null 2>&1; then
tmp_config="$(mktemp)"
jq --arg basepath "$base_path" '.BasePathOverride = $basepath' "$CONFIG_LOCATION" > "$tmp_config"
mv "$tmp_config" "$CONFIG_LOCATION"
else
bashio::log.warning "jq not available; skipping BasePathOverride update"
fi
fi

View File

@@ -1,4 +1,4 @@
root /app/Jackett;
root /app/radarr/bin/UI;
server_name $hostname;
add_header X-Content-Type-Options nosniff;

View File

@@ -13,12 +13,6 @@ server {
proxy_read_timeout 30m;
proxy_pass http://127.0.0.1:9117;
# Allow signalr
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
#auth_basic off;
# Correct base_url
proxy_set_header Accept-Encoding "";
sub_filter_once off;

View File

@@ -3,8 +3,22 @@
set -e
# ==============================================================================
# Set variables
slug=jackett
port=9117
CONFIG_LOCATION=/config/addons_config/Jackett/ServerConfig.json
# Wait for Jackett to become available
bashio::net.wait_for 9117 localhost 900
bashio::net.wait_for "$port" localhost 900
# Ensure BasePathOverride is set for ingress
if [ -f "$CONFIG_LOCATION" ] && ! bashio::config.true "ingress_disabled"; then
if ! grep -q "\"BasePathOverride\"[[:space:]]*:[[:space:]]*\"${slug}\"" "$CONFIG_LOCATION"; then
bashio::log.warning "BasePathOverride not set properly, restarting"
sed -i -E "s/\"BasePathOverride\"[[:space:]]*:[[:space:]]*\"[^\"]*\"/\"BasePathOverride\": \"${slug}\"/" "$CONFIG_LOCATION"
bashio::addon.restart
fi
fi
bashio::log.info "Starting NGinx..."
exec nginx