更新文件: rclone.conf, runwebdavsim.sh, rclonemount.sh, runembysim.sh, embysim.tar.xz 等7个文件
This commit is contained in:
BIN
embysim.tar.xz
BIN
embysim.tar.xz
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
# Load the njs script
|
# Load the njs script
|
||||||
js_path /etc/nginx/conf.d/;
|
js_path /etc/nginx/conf.d/;
|
||||||
js_import addExternalUrl from externalUrl.js;
|
js_import addExternalUrl from externalUrl.js;
|
||||||
js_shared_dict_zone zone=path_cache:10m;
|
js_shared_dict_zone zone=path_cache:10m timeout=3600s evict;
|
||||||
|
|
||||||
server{
|
server{
|
||||||
gzip on;
|
gzip on;
|
||||||
|
|||||||
@ -219,12 +219,12 @@ const rewritePlaybackInfo = async (r, data, flags) => {
|
|||||||
//r.error("Original response body: " + r.responseText);
|
//r.error("Original response body: " + r.responseText);
|
||||||
if (flags.last === false) {
|
if (flags.last === false) {
|
||||||
oriData += data;
|
oriData += data;
|
||||||
r.error(`flags.last: ${flags.last} , data.length: ${data.length}`);
|
//r.error(`flags.last: ${flags.last} , data.length: ${data.length}`);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
r.error(`flags.last: ${flags.last}`);
|
//r.error(`flags.last: ${flags.last}`);
|
||||||
data = JSON.parse(oriData);
|
data = JSON.parse(oriData);
|
||||||
r.error(`data.length: ${JSON.stringify(data).length}`);
|
//r.error(`data.length: ${JSON.stringify(data).length}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// try {
|
// try {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
[webdavsim-nas]
|
[webdavsim-nas]
|
||||||
type = webdav
|
type = webdav
|
||||||
pass = LicA6JEdhZ3Gk1FbXGvqA5g-IPG3jDpqpMf69A
|
pass = lgqcDYNMs5j9t1MI4MuD1jstGd7igRXRIGjoRw
|
||||||
url = http://127.0.0.1:5678
|
url = http://127.0.0.1:5678
|
||||||
user = guest
|
user = guest
|
||||||
|
|
||||||
|
|||||||
@ -65,8 +65,18 @@ if [ "$webdavsimok" != "1" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "ready to rclone mount, please wait...(about 10s)"
|
webdav_port=$(cat runwebdavsim.sh|grep -E "^WEBDAV_PORT="|awk -F '=' '{print $2}')
|
||||||
rclone --config rclone.conf mount webdavsim-nas:/dav external/rclone.media --daemon --daemon-wait 5s --no-check-certificate --allow-other --umask 000 --default-permissions --dir-cache-time 1h --webdav-vendor rclone --vfs-cache-mode writes --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit 1G --buffer-size 64M --vfs-cache-max-age 1h --vfs-cache-max-size 10G --timeout 1800s --contimeout 10s --daemon-timeout 300s --poll-interval 1800s --low-level-retries 2 --cache-dir rclone.cache --log-file rclone.log
|
webdav_user=$(cat runwebdavsim.sh|grep -E "^WEBDAV_USER="|awk -F '=' '{print $2}')
|
||||||
|
webdav_pass=$(cat runwebdavsim.sh|grep -E "^WEBDAV_PASS="|awk -F '=' '{print $2}')
|
||||||
|
echo "get webdav config from runwebdavsim.sh port:${webdav_port} user:${webdav_user} pass:${webdav_pass}"
|
||||||
|
rclone --config rclone.conf config update webdavsim-nas user=${webdav_user}
|
||||||
|
rclone --config rclone.conf config password webdavsim-nas pass=${webdav_pass}
|
||||||
|
rclone --config rclone.conf config update webdavsim-nas url=http://127.0.0.1:${webdav_port}
|
||||||
|
echo "update rclone.conf finish"
|
||||||
|
cat rclone.conf
|
||||||
|
|
||||||
|
echo "ready to rclone mount, please wait...(about 1s)"
|
||||||
|
rclone --config rclone.conf mount webdavsim-nas:/dav external/rclone.media --daemon --daemon-wait 1s --no-check-certificate --allow-other --umask 000 --default-permissions --dir-cache-time 1h --webdav-vendor rclone --vfs-cache-mode writes --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit 1G --buffer-size 64M --vfs-cache-max-age 1h --vfs-cache-max-size 10G --timeout 1800s --contimeout 10s --daemon-timeout 300s --poll-interval 1800s --low-level-retries 2 --cache-dir rclone.cache --log-file rclone.log
|
||||||
#rclone --config rclone.conf mount webdavsim-nas:/dav external/rclone.media --daemon --daemon-wait 10s --no-check-certificate --allow-other --umask 000 --default-permissions --dir-cache-time 1h --webdav-vendor rclone --vfs-cache-mode off --timeout 1800s --contimeout 10s --daemon-timeout 300s --poll-interval 1800s --low-level-retries 2 --log-file rclone.log
|
#rclone --config rclone.conf mount webdavsim-nas:/dav external/rclone.media --daemon --daemon-wait 10s --no-check-certificate --allow-other --umask 000 --default-permissions --dir-cache-time 1h --webdav-vendor rclone --vfs-cache-mode off --timeout 1800s --contimeout 10s --daemon-timeout 300s --poll-interval 1800s --low-level-retries 2 --log-file rclone.log
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "mount ok"
|
echo "mount ok"
|
||||||
|
|||||||
@ -47,8 +47,11 @@ interface=$(ip route show | grep default | awk '{print $5}')
|
|||||||
export SELFIP=$(ip addr show $interface | grep -w inet | awk '{print $2}' | cut -d/ -f1|head -1)
|
export SELFIP=$(ip addr show $interface | grep -w inet | awk '{print $2}' | cut -d/ -f1|head -1)
|
||||||
echo "DETECT SELF IP:${SELFIP}, if this is not correct, change SELFIP to your real ip"
|
echo "DETECT SELF IP:${SELFIP}, if this is not correct, change SELFIP to your real ip"
|
||||||
|
|
||||||
url=$(cat rclone.conf |grep -E "^url"|sed -e 's/.*\(http.*\)/\1/'|head -1)
|
#url=$(cat rclone.conf |grep -E "^url"|sed -e 's/.*\(http.*\)/\1/'|head -1)
|
||||||
echo "get webdav url from rclone:$url"
|
#echo "get webdav url from rclone:$url"
|
||||||
|
webdav_port=$(cat runwebdavsim.sh|grep -E "^WEBDAV_PORT="|awk -F '=' '{print $2}')
|
||||||
|
echo "get webdav port from runwebdavsim.sh: ${webdav_port}"
|
||||||
|
url="http://127.0.0.1:${webdav_port}/dav"
|
||||||
curl -v -L $url
|
curl -v -L $url
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
iswebdavsim=$(curl -v -L $url -o - 2>&1|grep "Path-Based WebDAV Server"|wc -l)
|
iswebdavsim=$(curl -v -L $url -o - 2>&1|grep "Path-Based WebDAV Server"|wc -l)
|
||||||
@ -105,6 +108,7 @@ if [ $? -eq 0 ]; then
|
|||||||
sed -i -e "s|- .*emby.cache:/cache|- ${progdir}/emby.cache:/cache|g" docker-compose.yml
|
sed -i -e "s|- .*emby.cache:/cache|- ${progdir}/emby.cache:/cache|g" docker-compose.yml
|
||||||
docker stop embyUrl-nginx
|
docker stop embyUrl-nginx
|
||||||
docker stop embysim
|
docker stop embysim
|
||||||
|
rm -rf emby.tmp/*
|
||||||
#docker-compose down
|
#docker-compose down
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|
||||||
@ -136,6 +140,7 @@ else
|
|||||||
|
|
||||||
docker stop embysim
|
docker stop embysim
|
||||||
docker rm embysim
|
docker rm embysim
|
||||||
|
rm -rf emby.tmp/*
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--sysctl net.ipv6.conf.all.disable_ipv6=1 \
|
--sysctl net.ipv6.conf.all.disable_ipv6=1 \
|
||||||
--name embysim \
|
--name embysim \
|
||||||
|
|||||||
@ -44,6 +44,8 @@ fi
|
|||||||
echo "arch:$arch"
|
echo "arch:$arch"
|
||||||
chmod 755 webdav_simulator.$arch
|
chmod 755 webdav_simulator.$arch
|
||||||
WEBDAV_PORT=5678
|
WEBDAV_PORT=5678
|
||||||
|
WEBDAV_USER=guest
|
||||||
|
WEBDAV_PASS=guest_Api789
|
||||||
rm -rf tmp.${WEBDAV_PORT}
|
rm -rf tmp.${WEBDAV_PORT}
|
||||||
mkdir tmp.${WEBDAV_PORT}
|
mkdir tmp.${WEBDAV_PORT}
|
||||||
chmod 777 tmp.${WEBDAV_PORT}
|
chmod 777 tmp.${WEBDAV_PORT}
|
||||||
@ -52,8 +54,8 @@ while true
|
|||||||
do
|
do
|
||||||
curl -v -L "http://127.0.0.1:${WEBDAV_PORT}/dav"
|
curl -v -L "http://127.0.0.1:${WEBDAV_PORT}/dav"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
# ./webdav_simulator.$arch --selfip $SELFIP --port ${WEBDAV_PORT} --noindex --alist_config alistservers.txt --username guest --password guest_Api789 --proxymode 1 --blackwords '抖音,短剧,音乐22,mp3,wav,flac,BACKUP,BDMV,txt' --fake_media_file fake.mkv --strmmode 'xy115-all.txt.xz#xy-dy.txt.xz#xy-dsj.txt.xz#xy115-music.txt.xz'
|
# ./webdav_simulator.$arch --selfip $SELFIP --port ${WEBDAV_PORT} --noindex --alist_config alistservers.txt --username ${WEBDAV_USER} --password ${WEBDAV_PASS} --proxymode 1 --blackwords '抖音,短剧,音乐22,mp3,wav,flac,BACKUP,BDMV,txt' --fake_media_file fake.mkv --strmmode 'xy115-all.txt.xz#xy-dy.txt.xz#xy-dsj.txt.xz#xy115-music.txt.xz'
|
||||||
./webdav_simulator.$arch --selfip $SELFIP --port ${WEBDAV_PORT} --noindex --alist_config alistservers.txt --username guest --password guest_Api789 --proxymode 1 --blackwords '抖音,短剧,音乐22,mp3,wav,flac,BACKUP,BDMV,txt' --fake_media_file fake.mkv --strmmode 'xy115-all.txt.xz#xy-dy.txt.xz#xy-dsj.txt.xz#xy115-music.txt.xz'
|
./webdav_simulator.$arch --selfip $SELFIP --port ${WEBDAV_PORT} --noindex --alist_config alistservers.txt --username ${WEBDAV_USER} --password ${WEBDAV_PASS} --proxymode 1 --blackwords '抖音,短剧,音乐22,mp3,wav,flac,BACKUP,BDMV,txt' --fake_media_file fake.mkv --strmmode 'xy115-all.txt.xz#xy-dy.txt.xz#xy-dsj.txt.xz#xy115-music.txt.xz'
|
||||||
echo "webdavsim exit, sleep 5s and restart"
|
echo "webdavsim exit, sleep 5s and restart"
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user