🗃️ Committing everything that changed 🗃️

rootfs/tmp/etc/aria2/aria-ng.config.js
rootfs/tmp/etc/nginx/nginx.conf
rootfs/usr/local/etc/docker/init.d/00-aria2c.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
casjay 2025-05-13 17:50:29 -04:00
parent 0d671d8ee2
commit 5c19c0e5c1
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145
4 changed files with 180 additions and 175 deletions

View File

@ -525,7 +525,7 @@
browserNotification: !1,
rpcAlias: 'aria2',
rpcHost: 'REPLACE_SERVER_ADDR',
rpcPort: 'REPLACE_SERVER_PORT',
rpcPort: '80',
rpcInterface: 'jsonrpc',
protocol: 'http',
httpMethod: 'POST',
@ -2741,7 +2741,9 @@
try {
i = c.base64UrlDecode(i);
} catch (e) {
return d.showError('RPC secret is not base64 encoded!'), !1;
return (
d.showError('RPC secret is not base64 encoded!'), !1
);
}
var s = {
rpcAlias: '',
@ -5048,7 +5050,11 @@
: 'percent' === a.type
? n('orderBy')(e, ['completePercent'], a.reverse)
: 'remain' === a.type
? n('orderBy')(e, ['idle', 'remainTime', 'remainLength'], a.reverse)
? n('orderBy')(
e,
['idle', 'remainTime', 'remainLength'],
a.reverse
)
: 'dspeed' === a.type
? n('orderBy')(e, ['downloadSpeed'], a.reverse)
: 'uspeed' === a.type

View File

@ -40,7 +40,7 @@ http {
proxy_read_timeout 86400;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:6800/jsonrpc;
proxy_pass http://REPLACE_SERVER_ADDR:REPLACE_RPC_PORT/jsonrpc;
}
location /rpc {
@ -48,7 +48,7 @@ http {
proxy_read_timeout 86400;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:6800/jsonrpc;
proxy_pass http://REPLACE_SERVER_ADDR:REPLACE_RPC_PORT/jsonrpc;
}
location = /favicon.ico {

View File

@ -224,6 +224,7 @@ __update_conf_files() {
local get_data_dir="$(grep -Rs 'dir=' "/config/aria2/aria2.conf" | awk -F'=' '{print $2}')"
local get_config="$(find "$WWW_ROOT_DIR/js" -name 'aria-ng-*.min.js' | grep -v 'f1dd57abb9.min' | head -n1)"
local get_session_file="$(grep -Rs 'aria2.session' "/config/aria2/aria2.conf" | awk -F'=' '{print $2}' | head -n1)"
local rpc_port="${RPC_PORT:-${RPC_LISTEN:-6800}}"
local dht_port="$DHT_LISTEN_PORT"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# delete files
@ -234,8 +235,7 @@ __update_conf_files() {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# replace variables
__replace "REPLACE_RPC_PORT" "$SERVICE_PORT" "$CONF_DIR/aria2.conf"
__replace "REPLACE_SERVER_PORT" "$SERVICE_PORT" "$CONF_DIR/aria-ng.config.js"
__replace "REPLACE_RPC_PORT" "$rpc_port" "$CONF_DIR/aria2.conf"
__replace "REPLACE_SERVER_ADDR" "$CONTAINER_IP4_ADDRESS" "$CONF_DIR/aria-ng.config.js"
if [ -n "$RPC_SECRET" ]; then
echo "Changing rpc secret to $RPC_SECRET"

View File

@ -221,6 +221,7 @@ __run_pre_execute_checks() {
__update_conf_files() {
local exitCode=0 # default exit code
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
local rpc_port="${RPC_PORT:-${RPC_LISTEN:-6800}}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# delete files
#__rm ""
@ -230,10 +231,8 @@ __update_conf_files() {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# replace variables
# __replace "" "" "$CONF_DIR/nginx.conf"
# replace variables recursively
# __find_replace "" "" "$CONF_DIR"
__replace "REPLACE_RPC_PORT" "$rpc_port" "$CONF_DIR/nginx.conf"
__replace "REPLACE_SERVER_ADDR" "$CONTAINER_IP4_ADDRESS" "$CONF_DIR/nginx.conf"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# define actions