finalized

This commit is contained in:
2026-04-05 18:07:31 +03:00
parent 414b5fe5d5
commit 9b37b6dfb1
7 changed files with 577 additions and 2 deletions

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM nginx:alpine
RUN apk add --no-cache grep nano bash curl inotify-tools gettext
RUN mkdir -p /etc/nginx/templates
RUN curl -o /etc/nginx/templates/license.conf.template \
https://arg0.dev/emby/nginx-configs/unlock.conf
RUN mkdir -p /tmp/network \
&& curl -o /tmp/network/network.js https://arg0.dev/emby/js/network.js \
&& curl -o /tmp/network/network.html https://arg0.dev/emby/js/network.html
RUN curl -o /listener.sh https://arg0.dev/emby/shell/listener.sh \
&& chmod +x /listener.sh
CMD /bin/sh -c "cp /tmp/network/* /app/emby/system/dashboard-ui/network/ && envsubst '\$PROXY_PORT' < /etc/nginx/templates/license.conf.template > /etc/nginx/conf.d/license.conf && /listener.sh & nginx -g 'daemon off;'"

View File

@@ -1,3 +1,85 @@
# emby-proxy-helper
# Emby Proxy Helper
Educational Docker-based media server lab using Emby Server and reverse proxy. Repository contains only references; software runs on a self-hosted server.
## ⚠️ Legal and Ethical Notice (For Educational Purposes Only)
This project is intended solely for educational, research, development, and testing purposes on networks under your control.
Using this software to bypass licensing mechanisms, use paid features without authorization, or violate terms of service is not recommended, and the responsibility lies entirely with the user.
## 🚀 Overview
Two Docker-based services: Emby Server + Nginx helper
Host scripts: Windows, Linux, macOS (shell/ folder)
Services can access the same files via shared volumes and networks
## ⚡ Startup
Run the `start.cmd` file according to your operating system.
### Windows
```cmd
> .\start.cmd
```
### Linux/Mac
```bash
$ sudo sh start.cmd
```
## 🛠 Configuration
Do not modify the mount and interface structure in `docker-compose.yml`.
Add your media paths under `x-common-volumes`.
## 🌐 To access Global Premiere Features (Global Reverse Proxy)
A proxy server is required for this process. (e.g., Raspberry Pi)
- Install AdGuard Home
- Assign a static IP to the Pi
- Assign a subdomain to your domain address on Cloudflare: `dns.example.com`
| Type | Name | Proxy | TTL |
|------|------|-------|------|
| A | dns | DNS only - reserved IP | Auto |
- Obtain a Let’s Encrypt SSL certificate for `dns.example.com` using Certbot
- Restart **AdGuardHome.service**
- Go to dns.example.com → Setup tab → Configure DoH / DoT settings for your modem network
**Add a global host:**
```bash
35.209.229.156 mb3admin.com
```
## 📱 Client Apps
Depending on your needs, you can use one of the following apps:
- Android TV
- Android
- iOS
- Apple TV
Log in to the server and confirm the certificate warning to proceed.
## Manual Certificate Installation (Optional)
If you want to use Emby via a web browser, you will likely need to install the certificate manually. Under normal circumstances, `start.cmd` automatically handles this for your operating system. However, for devices like PlayStation and Xbox, you can also try installing the certificate manually using a Homebrew Enabler/Payloader.
Download the `*.crt` file from below and install it on the relevant device.
```bash
$ curl -O https://arg0.dev/emby/mb3admin.crt
```
Alternatively, if you cannot do this, you can bypass the HTTP error by simply visiting `mb3admin.com` in your browser before accessing the Emby web interface, and then proceed with the Emby web environment.
That’s it.
# Summary
This project should be used to:
Learn network configuration
Test reverse proxy logic
Examine Docker-based service architectures.
In real-world use cases, you must always comply with the relevant software’s license and terms of use.

33
docker-compose.yml Normal file
View File

@@ -0,0 +1,33 @@
x-common-volumes: &common-volumes
- ./config:/config
- ./network:/app/emby/system/dashboard-ui/network # Don't change that!
- ./media:/mnt/media
# - /your/own/host/path:/your/own/container/path # Add any additional volumes as needed
services:
emby:
image: linuxserver/emby:latest
container_name: emby-server
environment:
- PUID=1000
- PGID=1000
volumes: *common-volumes
restart: unless-stopped
networks:
- end0 # Do not change this unless you know what you are doing
premiere:
build: .
container_name: emby-premiere
environment:
- PROXY_PORT=8097 # The port on which the premiere server will listen
ports:
- "8097:8097"
volumes: *common-volumes
restart: unless-stopped
networks:
- end0 # Do not change this unless you know what you are doing
networks:
end0: # This is the network that both Emby and Premiere will use to communicate with each other. Do not change this unless you know what you are doing.
driver: bridge

124
shell/linux.sh Normal file
View File

@@ -0,0 +1,124 @@
#!/bin/bash
clear
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
CYAN=$(tput setaf 6)
RESET=$(tput sgr0)
echo "${CYAN}"
cat << "EOF"
-----------------------------------------------------------
| |
| Emby Unlocker for Lifetime Premiere |
| https://github.com/arg0WAK |
| |
-----------------------------------------------------------
EOF
echo "${RESET}"
echo "${YELLOW}[ℹ]${RESET} Checking for administrative privileges..."
if [ "$(id -u)" -ne 0 ]; then
echo "${RED}[✖]${RESET} This script must be run as root (sudo)!"
exit 1
else
echo "${GREEN}[✔]${RESET} Root privileges confirmed."
fi
HOST_FILE="/etc/hosts"
IP_ARG0=$(ping -c 1 arg0.dev | sed -nE 's/^PING[^(]+\(([^)]+)\).*/\1/p' || echo "")
if [ -z "$IP_ARG0" ]; then
echo "${RED}[✖]${RESET} Failed to resolve fake validation server. Please check your network connection."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Adding entry to $HOST_FILE..."
sleep 2
PROXY="$IP_ARG0 mb3admin.com"
if ! grep -Fxq "$PROXY" "$HOST_FILE"; then
echo "$PROXY" >> "$HOST_FILE"
echo "${GREEN}[✔]${RESET} Entry successfully added: $PROXY"
else
echo "${CYAN}[✔]${RESET} Entry already exists, skipping."
fi
echo "${YELLOW}[ℹ]${RESET} Downloading certificate..."
CERT_FILE="mb3admin.crt"
CERT_URL="https://arg0.dev/emby/$CERT_FILE"
TEMP_CERT="/tmp/$CERT_FILE"
if curl --progress-bar -L "$CERT_URL" -o "$TEMP_CERT"; then
echo "${GREEN}[✔]${RESET} Certificate downloaded: $TEMP_CERT"
else
echo "${RED}[✖]${RESET} Failed to download certificate. Please check the URL."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Installing certificate to system store..."
sleep 2
cp "$TEMP_CERT" "/usr/local/share/ca-certificates/mb3admin.crt"
chmod 644 "/usr/local/share/ca-certificates/mb3admin.crt"
update-ca-certificates
if [ $? -eq 0 ]; then
echo "${GREEN}[✔]${RESET} Certificate successfully added to system store."
else
echo "${RED}[✖]${RESET} Failed to install certificate."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Cleaning up temporary files..."
sleep 2
rm -f "$TEMP_CERT"
echo "${GREEN}[✔]${RESET} Temporary certificate file removed."
echo "${YELLOW}[ℹ]${RESET} Restarting network services (flushing DNS cache)..."
sleep 2
systemd-resolve --flush-caches || resolvectl flush-caches || echo "${YELLOW}[ℹ]${RESET} Could not flush DNS cache with systemd-resolve or resolvectl."
echo "${YELLOW}[ℹ]${RESET} Testing network connectivity..."
sleep 10
IP_MB3ADMIN=$(ping -c 1 mb3admin.com | sed -nE 's/^PING[^(]+\(([^)]+)\).*/\1/p')
if [ "$IP_MB3ADMIN" == "$IP_ARG0" ]; then
echo "${GREEN}[✔]${RESET} Both domains match the same IP address: $IP_MB3ADMIN"
else
echo "${RED}[✖]${RESET} The domains do not match the same IP address. Please flush your DNS cache manually."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Checking SSL to mb3admin.com..."
sleep 2
SSL_STATUS=$(echo | openssl s_client -connect mb3admin.com:443 -servername mb3admin.com 2>/dev/null | openssl x509 -noout)
if [ $? -eq 0 ]; then
echo "${GREEN}[✔]${RESET} SSL certificate is valid."
else
echo "${RED}[✖]${RESET} SSL certificate is invalid or not trusted."
exit 1
fi
sleep 2
clear
echo "${CYAN}"
cat << "EOF"
---------------------------------------------------------------
| |
| Emby Premiere is now fully unlocked. |
| You can use any license key and enjoy all features! |
| |
---------------------------------------------------------------
EOF
echo "${RESET}"
echo "${YELLOW}[ℹ]${RESET} If you want to support my work, please consider starring my GitHub repository!"
echo "${CYAN}[ℹ]${RESET} telegram: @arg0WAK"
echo ""
sleep 3
xdg-open https://github.com/arg0WAK

129
shell/mac.sh Normal file
View File

@@ -0,0 +1,129 @@
#!/bin/bash
clear
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
CYAN=$(tput setaf 6)
RESET=$(tput sgr0)
echo "${CYAN}"
cat << "EOF"
-----------------------------------------------------------
| |
| Emby Unlocker for Lifetime Premiere |
| https://github.com/arg0WAK |
| |
-----------------------------------------------------------
EOF
echo "${RESET}"
echo "${YELLOW}[ℹ]${RESET} Checking for administrative privileges..."
if [ "$EUID" -ne 0 ]; then
echo "${RED}[✖]${RESET} This script must be run with sudo!"
exit 1
else
echo "${GREEN}[✔]${RESET} Root privileges confirmed."
fi
HOST_FILE="/etc/hosts"
IP_ARG0=$(ping -c 1 arg0.dev | sed -nE 's/^PING[^(]+\(([^)]+)\).*/\1/p')
if [ -z "$IP_ARG0" ]; then
echo "${RED}[✖]${RESET} Failed to resolve fake validation server."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Adding entry to $HOST_FILE..."
sleep 2
PROXY="$IP_ARG0 mb3admin.com"
if ! grep -Fxq "$PROXY" "$HOST_FILE"; then
echo "$PROXY" >> "$HOST_FILE"
echo "${GREEN}[✔]${RESET} Entry successfully added: $PROXY"
else
echo "${CYAN}[✔]${RESET} Entry already exists, skipping."
fi
echo "${YELLOW}[ℹ]${RESET} Downloading certificate..."
CERT_FILE="mb3admin.crt"
CERT_URL="https://arg0.dev/emby/$CERT_FILE"
TEMP_CERT="/tmp/$CERT_FILE"
if curl -L "$CERT_URL" -o "$TEMP_CERT"; then
echo "${GREEN}[✔]${RESET} Certificate downloaded: $TEMP_CERT"
else
echo "${RED}[✖]${RESET} Failed to download certificate."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Installing certificate to system keychain..."
sleep 2
security add-trusted-cert -d -r trustRoot \
-k /Library/Keychains/System.keychain \
"$TEMP_CERT"
if [ $? -eq 0 ]; then
echo "${GREEN}[✔]${RESET} Certificate successfully added to system keychain."
else
echo "${RED}[✖]${RESET} Failed to install certificate."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Cleaning up temporary files..."
sleep 2
rm -f "$TEMP_CERT"
echo "${GREEN}[✔]${RESET} Temporary certificate file removed."
echo "${YELLOW}[ℹ]${RESET} Flushing DNS cache..."
sleep 2
dscacheutil -flushcache
killall -HUP mDNSResponder 2>/dev/null
echo "${YELLOW}[ℹ]${RESET} Testing network connectivity..."
sleep 5
IP_MB3ADMIN=$(ping -c 1 mb3admin.com | sed -nE 's/^PING[^(]+\(([^)]+)\).*/\1/p')
if [ "$IP_MB3ADMIN" == "$IP_ARG0" ]; then
echo "${GREEN}[✔]${RESET} Both domains match the same IP address: $IP_MB3ADMIN"
else
echo "${RED}[✖]${RESET} Domains do not match."
exit 1
fi
echo "${YELLOW}[ℹ]${RESET} Checking SSL..."
sleep 2
echo | openssl s_client -connect mb3admin.com:443 -servername mb3admin.com 2>/dev/null | openssl x509 -noout > /dev/null
if [ $? -eq 0 ]; then
echo "${GREEN}[✔]${RESET} SSL certificate is valid."
else
echo "${RED}[✖]${RESET} SSL certificate is invalid."
exit 1
fi
clear
echo "${CYAN}"
cat << "EOF"
---------------------------------------------------------------
| |
| Emby Premiere is now fully unlocked. |
| You can use any license key and enjoy all features! |
| |
---------------------------------------------------------------
EOF
echo "${RESET}"
echo "${YELLOW}[ℹ]${RESET} If you want to support my work, star the repo!"
echo "${CYAN}[ℹ]${RESET} telegram: @arg0WAK"
sleep 3
open https://github.com/arg0WAK

142
shell/win.cmd Normal file
View File

@@ -0,0 +1,142 @@
chcp 65001 >nul
@echo off
net session >nul 2>&1
if %errorlevel% neq 0 (
powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
cls
set "RED=[31m"
set "GREEN=[32m"
set "YELLOW=[33m"
set "CYAN=[36m"
set "RESET=[0m"
for /F "delims=" %%e in ('echo prompt $E^| cmd') do set "ESC=%%e"
echo %ESC%%CYAN%
echo -----------------------------------------------------------
echo ^| ^|
echo ^| Emby Unlocker for Lifetime Premiere ^|
echo ^| https://github.com/arg0WAK ^|
echo ^| ^|
echo -----------------------------------------------------------
echo %ESC%%RESET%
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Checking for administrative privileges...
net session >nul 2>&1
if %errorlevel% neq 0 (
echo %ESC%%RED%[✖ ]%ESC%%RESET% This script must be run as Administrator!
pause
exit /b
) else (
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Admin privileges confirmed.
)
set HOST_FILE=C:\Windows\System32\drivers\etc\hosts
for /f "tokens=2 delims=:" %%A in ('nslookup arg0.dev ^| find "Address"') do (
set IP_ARG0=%%A
)
set IP_ARG0=%IP_ARG0: =%
if "%IP_ARG0%"=="" (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Failed to resolve fake validation server.
pause
exit /b
)
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Adding entry to %HOST_FILE%...
timeout /t 2 >nul
set PROXY=%IP_ARG0% mb3admin.com
findstr /C:"%PROXY%" %HOST_FILE% >nul
if %errorlevel% neq 0 (
echo %PROXY% >> %HOST_FILE%
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Entry successfully added: %PROXY%
) else (
echo %ESC%%CYAN%[✔ ]%ESC%%RESET% Entry already exists, skipping.
)
set CERT_URL=https://arg0.dev/emby/mb3admin.crt
set TEMP_CERT=%TEMP%\mb3admin.crt
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Downloading certificate...
timeout /t 2 >nul
pushd "%TEMP%" >nul
curl -L -O "%CERT_URL%" >nul 2>&1
set CURL_EXIT=%errorlevel%
popd >nul
if not exist "%TEMP_CERT%" (
echo %ESC%%YELLOW%[!]%ESC%%RESET% Download failed, trying local fallback...
if exist "%~dp0mb3admin.crt" (
copy "%~dp0mb3admin.crt" "%TEMP_CERT%" >nul
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Local certificate used.
) else (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Certificate not found.
pause
exit /b
)
) else (
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Certificate downloaded.
)
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Installing certificate...
timeout /t 2 >nul
certutil -addstore -f "Root" "%TEMP_CERT%" >nul 2>&1
if %errorlevel% neq 0 (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Failed to install certificate.
pause
exit /b
) else (
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Certificate successfully added.
)
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Cleaning up...
timeout /t 2 >nul
del "%TEMP_CERT%" >nul
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Temporary file removed.
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Flushing DNS cache...
ipconfig /flushdns >nul
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% Testing network connectivity...
timeout /t 5 >nul
ping -n 1 mb3admin.com >nul
if %errorlevel% neq 0 (
echo %ESC%%RED%[✖ ]%ESC%%RESET% Network test failed.
pause
exit /b
)
echo %ESC%%GREEN%[✔ ]%ESC%%RESET% Network OK.
timeout /t 2 >nul
cls
echo %ESC%%CYAN%
echo ---------------------------------------------------------------
echo ^| ^|
echo ^| Emby Premiere is now fully unlocked. ^|
echo ^| You can use any license key and enjoy all features! ^|
echo ^| ^|
echo ---------------------------------------------------------------
echo %ESC%%RESET%
echo %ESC%%YELLOW%[ℹ ]%ESC%%RESET% If you want to support, star the repo!
echo %ESC%%CYAN%[ℹ ]%ESC%%RESET% telegram: @arg0WAK
timeout /t 3 >nul
start https://github.com/arg0WAK

48
start.cmd Normal file
View File

@@ -0,0 +1,48 @@
: <<'BATCH'
@echo off
setlocal
cd /d "%~dp0"
echo Starting Docker Compose...
docker compose up -d --build
if errorlevel 1 (
echo Docker Compose failed.
exit /b 1
)
echo Running Windows post-setup script...
call "%~dp0shell\win.cmd"
endlocal
exit /b
BATCH
set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
echo "Starting Docker Compose..."
docker compose up -d --build
case "$(uname -s 2>/dev/null | tr '[:upper:]' '[:lower:]')" in
darwin*)
echo "Running macOS post-setup script..."
bash "$SCRIPT_DIR/shell/mac.sh"
;;
linux*)
echo "Running Linux post-setup script..."
bash "$SCRIPT_DIR/shell/linux.sh"
;;
mingw*|msys*|cygwin*|win*)
echo "Running Windows post-setup script..."
if command -v cygpath >/dev/null 2>&1; then
WIN_DIR=$(cygpath -w "$SCRIPT_DIR")
else
WIN_DIR=$SCRIPT_DIR
fi
cmd.exe /c "\"$WIN_DIR\\shell\\win.cmd\""
;;
*)
echo "Running Linux post-setup script..."
bash "$SCRIPT_DIR/shell/linux.sh"
;;
esac