hjyssg / ShiguReader

硬核宅宅资源管理器. Ultimate Manga Resource Manager
MIT License
400 stars 45 forks source link

Succeeded in running on synology NAS #90

Closed taka0913 closed 3 years ago

taka0913 commented 4 years ago

Below are the steps I took.

Nodejs is installed on the synology NAS.

Install Java on your NAS. However, my NAS did not need to be installed because the CPU is arm v7.

If you don’t already have a ‘shared folder’ for your Comics, create one.

Enter administrator mode with "sudo -i".

sudo -i

Install entware-ng. It's a package manager and you can easily install imagemagick. https://github.com/Entware/Entware-ng

Install imagemagick with entware-ng.

opkg install imagemagick

Install git.

opkg install git opkg install git-http

git clone https://github.com/hjyssg/ShiguReader

modify src/path-config. replace "D:" to "/volume1" for example "/volume1/Comic" if shared folder is "Comic".

modify src/config/user-config.js. replace "D:" to "/volume1" replace "\" to "/" for example "/volume1/Comic/_Happy_Lesson/_Going_to_sort/_good/"

7z is included in Synology NAS as standard, but there was a problem, so install it separately.

opkg install p7zip

cd ShiguReader

npm install If some packages fail to install with a warning, force them to install with the "--force" command.

run.

npm run dev

It's works.

hjyssg commented 4 years ago

Awesome! Thank you very much!

taka0913 commented 4 years ago

I like this tool very much, but it is not accessible from the outside. That's because anyone can see the page if they know the URL. So I hope this tool implements user login functionality.

hjyssg commented 4 years ago

ShiguReader is not safe when it can be accessed from public IP. The server code is not prepared for any cyber attack.

Let me guess your use case. If you just want to watch comic or anime when you are not at home, you can just download files into you tablet. For example, my ipad has VLC for video and ComicGlass for comic. I download file in Chrome browser and save them to my app. So I can read comic when going outside.

hjyssg commented 4 years ago

Or you dont want your family members see your personal comic collection even they know the URL. Then I can add a small password page, such that only the person who knows the password can open and read ShiguReader.

Which one is your use case?

taka0913 commented 4 years ago

I understand that it is dangerous from a security point of view. So I give up accessing from outside the house. But it's also true that, as you say, I don't want my family to see the site. Could you please add a simple password page?

hjyssg commented 4 years ago

Hahah, sure, I will add a simple password page.

taka0913 commented 4 years ago

Thank you very much. By the way, I want to remove the download button, where should I comment it out?

hjyssg commented 4 years ago

It is at FileChangeToolbar.js renderDownloadLink()

taka0913 commented 4 years ago

I got these errors when I commented out. And the site froze.

[HPM] Error occurred while trying to proxy request /api/lsDir from 192.168.1.2:3000 to http://localhost:8080 (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors) [HPM] Error occurred while trying to proxy request /api/getGoodAuthorNames from 192.168.1.2:3000 to http://localhost:8080 (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors)

hjyssg commented 4 years ago

It is totally unrelated, are you using any vpn or proxy?

taka0913 commented 4 years ago

No. I'm not using it.

hjyssg commented 4 years ago

image

All you need to do is as above. Not sure if you change any other code

taka0913 commented 4 years ago

I see. I understand the cause. I commented out too much.

image

taka0913 commented 4 years ago

It works fine. Thank you for your polite advice.

hjyssg commented 4 years ago

Hahah, it is my pleasure.

hjyssg commented 4 years ago

https://github.com/hjyssg/ShiguReader/commit/befc01dbd184eb446cc9131f76645a46147c3a61 I added a password page

image

image

taka0913 commented 4 years ago

Wow. Thank you for updating so quickly. The password page works in my environment as well.

hjyssg commented 4 years ago

Two potential reasons:

  1. Your disk has no space left to save the thumbnail
  2. The title is too long. Such that the file path is too long for the OS to save the thumbnail

On Sat, Sep 26, 2020 at 6:43 PM taka0913 notifications@github.com wrote:

I am currently unable to generate thumbnails with an error like this. [image: image] https://user-images.githubusercontent.com/30193809/94338750-a49abf80-002f-11eb-89bf-4a3532fbf889.png

When I executed the same command with 7zip alone, I suspect that the cause of the error is the space in the file name. [image: image] https://user-images.githubusercontent.com/30193809/94338777-e3307a00-002f-11eb-9cc4-13fe7474a765.png

Also, I think it is incorrect that there is no space after the "-o" command.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hjyssg/ShiguReader/issues/90#issuecomment-699477831, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAW6RU632ZAQ5DY4OMBWIRDSHXAVXANCNFSM4RV6DDSA .

taka0913 commented 4 years ago

Thank you for your reply. The cause was cloned to the root folder, so there wasn't enough space set. Now I have moved the code below /volume1 so no error has occurred.