Open locksoft opened 2 weeks ago
Hey @locksoft !
For a quick workaround I would recommend adding the IP to your /etc/hosts
file and assign a made-up domain name. You then would create a directory with that domain name.
And you could also create a JavaScript file that only fires if the specific port is present.
Example
/etc/hosts
entry:192.168.0.5 plex.nas
This way you would create a directory called plex.nas
, where you store your JS and CSS files.
// Example JavaScript
const port = location.port
if (port == 1337) {
console.log("Hello there!")
}
Keep in mind that location.port
will only return a port number if the port is specified in the URL - otherwise it's just an empty string.
Hope this helps...
EDIT: Regarding your P.S.: You would have to create a directory for each available TLD (Top Level Domain) for example:
I don't think there is a wildcard available to achieve this behavior right now.
Also - I don't know if Tamperish can handle symlinks - you could test that and try to create a global file and just symlink this file to each of the TLD directories. This way you only have to manage a single file.
Creating symlinks is fairly easy: $ ln -s /path/to/original/file /path/to/destination/symlink
Thanks for your answer, Nicolai.
I was able to "remap" plex.nas to the IP url, but I just realized that plex is not working correctly if I don't use an IP.
It's a long story but it seems to have some refreshing problem with the photos section.
So I need to find a way to make Temperish work with an IP (or, as a general setting, with all websites, anyway the CSS I need to change is quite unique).
Hey @locksoft,
Only the IP address without the port should go into the /etc/hosts
file.
You need to specify the port in the URL later.
Try accessing your local domain by specifying the protocol in the URL for example: http://plex.nas:1337
. This way your browsers search engine won't try to find public search results.
Symlinks are pretty much aliases of files or directories. The last bit in my previous answer is an example of the shell command to create such a symlink. The dollar sign just indicates a prompt of a terminal, where you can enter shell commands. So just open up a terminal and enter ln -s
followed by the path to the file or directory you want to create an alias for. The last part would be the path to the alias you want to create.
I recommend researching the bits you didn't understand from my answer like the ln -s
command.
If you need any further help, just hit me up and I'll try to help you.
EDIT: You could also try to make up a unique domain name that probably won't exist out there in public so your browser will less likely try to resolve it in public space.
Thanks again, Nicolai. Yes, the way you suggested works, and I was able to open the Plex page with Plex.nas:32400.
However, the (let’s call it’) “Plex bug” makes the website works properly only if I use an IP in the URL bar (it’s the same for every browser, not only Safari). It’s something I can’t understand well, and Plex support is almost not existent. If you’re curious this is the issue:
https://forums.plex.tv/t/error-displaying-photos-no-new-media-detection/880066/6
Anyway, my only option for now is use IP only. I’m not in a hurry, so I can wait, but it would be great if in future Tamperish could use a general CSS file that will work everywhere for every website. Something like a * jolly (let’s say “use red text everywhere”). This way I can set my specific CSS for IP based websites like Plex. :)
I need to access Plex on my NAS via IP: 192.168.0.5:[port number]
I created a folder called "192.168.0.5" but Tamperish keeps saying "no folder set".
I wanted to try adding the port number to the folder but in MacOS the ":" character in file names is forbidden.
How can I solve the problem?
Thanks.
P.S. It would be great also a style in the root, valid for all websites. I moved a css there but it doesn't work.