Homebrew RELEASE Welcome to the official TinfoilWebServer thread

  • Thread starter Thread starter MysterTee
  • Start date Start date
  • Views Views 23,618
  • Replies Replies 49
  • Likes Likes 10

MysterTee

Well-Known Member
Newcomer
Joined
May 15, 2019
Messages
49
Reaction score
115
Trophies
1
Age
46
XP
934
Country
France
Welcome to this official TinfoilWebServer thread.

TinfoilWebServer is a console application (very similar to NUT) which allows to install Switch titles over your Network.

Documentation ; https://github.com/Myster-Tee/TinfoilWebServer

Download : https://github.com/Myster-Tee/TinfoilWebServer/releases

CHANGELOG:
  • v2.1.0
    • Possibility to setup user expiration date with a custom expiration message.
    • Cached Custom Index is destroyed when Custom Index is modified but JSON content is invalid.
    • Comments allowed in Custom Index JSON.
    • NReco.Logging.File updated to latest (v1.2.0).
    • Documentation updated with Docker instructions (basic Dockerfile included).
    • Minor improvements.
  • v2.0.2
    • Fix Custom Index feature
    • NReco.Logging.File from v1.1.7 to v1.2.0
    • Microsoft.AspNetCore.Hosting.WindowsServices from v8.0.0 to v8.0.1
  • v2.0.1
    • xcz files served by default
    • zip files served by default (to allow serving game saves)
    • Served files are reloaded when list of allowed extensions is changed
    • Fix server stop log in log file on Linux
  • v2.0.0
    • Possibility to fully customize the Tinfoil JSON index with any documented property (see CustomIndexPath config property)
    • Migrated to .NET 8
    • Automatic change detection of files in served directories to update served index cache immediatly
    • Fingerprint feature to automatically link devices unique ids to allowed users (see FingerprintsFilter section of config)
    • Log format can be fully customized
    • The working directory can be specified in command line (see --workingDir option)
    • The server can be run as a Windows service (see --winService command line option)
    • Possibility to store SHA256 hashed passwords instead of plaintext passwords in config, which is the default behavior now (see PwdType config property)
    • Non existing served directories are automatically created
    • Default JSON config not anymore shipped in zipped distributions (a template can now be downloaded separately from the assets)
    • General improvements to enhance the user's experience
  • v1.6.0
    • Configuration file and log file are now relative to current directory
    • Configuration file can be specified via command line option -c or --config
  • v1.5.0
    • IP blacklisting feature implemented
    • Incoming IP Address is logged
    • Default config file enriched with more options
    • Some logged messages have been revised to enhance the user's experience
    • .NET Framework Independent distributions added for linux-x64 and osx-x64
    • Possibility to override default Console log formatter from config file
  • v1.4.1
    • New setting Authentication.WebBrowserAuthEnabled added to enable the native Web Browser login prompt when not authenticated
  • v1.4.0
    • Security improved:
      • New setting ServeEmptyDirectories added to exclude empty directories from being served
      • Urls of non filtered files but existing files are not anymore served
      • Folder names can be hidden via new parameter StripDirectoryNames
    • No need to restart the server after editing most of the parametrers
    • A Message of the Day can be customized for each user
    • Urls of served files are now relative (can help fixing some issues behind reverse proxies)
    • Log to file supported (thanks to NReco.Logging.File)
    • Hierarchical Tinfoil index type replaced in favor of new setting ExtraRepositories
    • Fix 404 for served files with names containing '+' char (and maybe others)
    • Server do not break for denied accesses in served directories or files, an error is logged instead
    • Support proper download cancellation request
    • Many logged messages have been revised to enhance the user's experience
    • New assets published to support additional platforms including linux and osx
  • v1.3.0
    • Basic authentication implemented to restrict access to some specific users
    • Migrated to .NET 6.0
    • Minor changes
  • v1.2.0
    • Feature: cached index implemented (see new setting «CacheExpiration»)
    • Fix: files containing special chars (like +, spaces, etc.) are now fully supported
    • Fix: installed files are not anymore locked
    • Fix: default logging config section fixed
    • Some minor fixes improvements
  • v1.1.0
    • Posiibility to specify multiple served directories
  • v1.0.0
    • Initial release
 
Last edited by MysterTee,
So i have this working without authentication but when i turn it on i see my content but when i try and install i get error 403 ?
Any help would be great.
 
Hi, thanks for your great work.I want to create users and it won't let me. After creating a user I restart the .exe and it doesn't start tinfoillserver :(greetings friend and sorry for this translation
 
Hi, thanks for your great work.I want to create users and it won't let me. After creating a user I restart the .exe and it doesn't start tinfoillserver :(greetings friend and sorry for this translation
You have to add comma "," after each users } like so in the config file. No comma after the last user


Code:
    "Users": [                          // List of allowed users (use a comma as separator for declaring multiple users)
      {
        "Name": string,                 // The user name
        "Pwd": string,                  // The password
        "MessageOfTheDay": string       // Custom message for the user
      },
            {
        "Name": string,                 // The user name
        "Pwd": string,                  // The password
        "MessageOfTheDay": string       // Custom message for the user
      },
            {
        "Name": string,                 // The user name
        "Pwd": string,                  // The password
        "MessageOfTheDay": string       // Custom message for the user
      }
    ]
  },
  "Blacklist": {...........
 
You have to add comma "," after each users } like so in the config file. No comma after the last user


Code:
    "Users": [                          // List of allowed users (use a comma as separator for declaring multiple users)
      {
        "Name": string,                 // The user name
        "Pwd": string,                  // The password
        "MessageOfTheDay": string       // Custom message for the user
      },
            {
        "Name": string,                 // The user name
        "Pwd": string,                  // The password
        "MessageOfTheDay": string       // Custom message for the user
      },
            {
        "Name": string,                 // The user name
        "Pwd": string,                  // The password
        "MessageOfTheDay": string       // Custom message for the user
      }
    ]
  },
  "Blacklist": {...........
Post automatically merged:

Hola, si, muchas gracias y perdón por no volver antes.
logrado y funcionando ya 1 mes :)
Es estable, pero después de un tiempo en línea, no muestra quién ingresa al servidor (si hay varios usuarios conectados)
Lo estoy probando en un servidor dedicado en mi tiempo libre :)
Sería sería ideal si tuviera más control de usuario, gracias por si funcionó.
 
@MysterTee Is there any kind of specific instruction so that I can propagate the server via the Internet? I would like to access the server which is on my PC in my dorm at my parents house.
Your need is not specific to TinfoilWebServer, you'll need to search for tutorials like "Access local server from the internet", but in short, in your box you'll need to setup a port redirection to your local machine (with TinfoilWebServer) and access your server (in your Switch) with the IP of your box with the chosen port for the redirection.
 
@MysterTee

this server can't not add multiple drives to shere in ServedDirectories ?

i can add multiple folder in same drive is work but add from another drive is not work

plz help
 
  • Like
Reactions: DragonMals
I would greatly appreciate some help. I had it running on my Synology NAS before, the only thing was the TinfoilWebServer got closed for an unknown reason. I would have to start it again and it would run for a period of time, then close again.

Is there anyone here running it on his/her Synology NAS? The error I get when starting it now is:

2024-01-09T21:32:10 : Listened addresses:
2024-01-09T21:32:10 : List of allowed users successfully loaded, 3 user(s) found (authentication is enabled).
2024-01-09T21:32:10 : 0 blacklisted IPs successfully loaded.
2024-01-09T21:32:10 : Refreshing served files cache.
2024-01-09T21:32:10 : Served files cache refreshed in 0.02s, 564 file(s) served.
2024-01-09T21:32:10 [E]: An unexpected error occurred: Permission denied
Exception Type: SocketException
Exception Message: Permission denied
Exception Stack Trace: at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)




Any help would be greatly appreciated. Thanks in advance!
 
I would greatly appreciate some help. I had it running on my Synology NAS before, the only thing was the TinfoilWebServer got closed for an unknown reason. I would have to start it again and it would run for a period of time, then close again.

Is there anyone here running it on his/her Synology NAS? The error I get when starting it now is:

2024-01-09T21:32:10 : Listened addresses:
2024-01-09T21:32:10 : List of allowed users successfully loaded, 3 user(s) found (authentication is enabled).
2024-01-09T21:32:10 : 0 blacklisted IPs successfully loaded.
2024-01-09T21:32:10 : Refreshing served files cache.
2024-01-09T21:32:10 : Served files cache refreshed in 0.02s, 564 file(s) served.
2024-01-09T21:32:10 [E]: An unexpected error occurred: Permission denied
Exception Type: SocketException
Exception Message: Permission denied
Exception Stack Trace: at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)




Any help would be greatly appreciated. Thanks in advance!
The latest version using TinfoilWebServer_v2.0.0_Framework-Independent-linux-x64.zip was successfully tested on DSM 7.1.
Maybe ensure that listened ports defined in config file are properly taken into account and try some other ports.
 
The latest version was successfully tested on DSM 7.1.
Maybe ensure that listened ports defined in config file are properly taken into account and try some other ports.
Thank you for your reply MysterTee!

I did some research and started the server as root through SSH (instead of another local user) and this seems to have solved my problem. The server is starting without errors now and I can reach it through internet (with the proper port forwarding and authentication, of course). Thanks again! I love the configurability of this Tinfoil Server (multiple users etc). Great work!

Edit 1: I have another question. I am sorry if they're obvious, but I couldn't find any answers searching.

My shop file listing (that I access in Tinfoil by "File Browser" -> "my shop name") isn't in any (alphabetical) order, but seems to be shuffled. And Tinfoil isn't giving me an option to sort the list of my shop in any way.
In Tinfoil when I'm in "New Games" (for example) I can sort the list (containing files of other shops) with "+" (sort by Name, Type, Released, etc.). Is there any way I can change this for my shop? Thanks again!

Edit 2: Nevermind. I guess it's by design (Tinfoil). Because when I disable all other shops so just my own shop is active, I can browse my files in "New Games" AND sort them.

I learn every day :)

Edit 3: lol. Now I have the shop running, but quite a lot of my files seem not to be showing in Tinfoil.

Below a picture of my filelisting (on my NAS) and under that Explorer window, my Tinfoil 'shop' on my Switch ("New Games").
As you can see there are loads of files not showing up on my Switch and I don't have a clue why.

When I do a search ("+" on my Switch) for a game that's not showing up in the list, it sometimes DOES find it there (when searched for) and installs fine, even though the file does not appear as it should in the default listing.

So strange... Anyone any ideas? Thanks!!
 

Attachments

  • IMG20240110191549.jpg
    IMG20240110191549.jpg
    6.2 MB · Views: 120
Last edited by GregNL,
  • Like
Reactions: MysterTee
Thank you for your reply MysterTee!

I did some research and started the server as root through SSH (instead of another local user) and this seems to have solved my problem. The server is starting without errors now and I can reach it through internet (with the proper port forwarding and authentication, of course). Thanks again! I love the configurability of this Tinfoil Server (multiple users etc). Great work!

Edit 1: I have another question. I am sorry if they're obvious, but I couldn't find any answers searching.

My shop file listing (that I access in Tinfoil by "File Browser" -> "my shop name") isn't in any (alphabetical) order, but seems to be shuffled. And Tinfoil isn't giving me an option to sort the list of my shop in any way.
In Tinfoil when I'm in "New Games" (for example) I can sort the list (containing files of other shops) with "+" (sort by Name, Type, Released, etc.). Is there any way I can change this for my shop? Thanks again!

Edit 2: Nevermind. I guess it's by design (Tinfoil). Because when I disable all other shops so just my own shop is active, I can browse my files in "New Games" AND sort them.

I learn every day :)

Edit 3: lol. Now I have the shop running, but quite a lot of my files seem not to be showing in Tinfoil.

Below a picture of my filelisting (on my NAS) and under that Explorer window, my Tinfoil 'shop' on my Switch ("New Games").
As you can see there are loads of files not showing up on my Switch and I don't have a clue why.

When I do a search ("+" on my Switch) for a game that's not showing up in the list, it sometimes DOES find it there (when searched for) and installs fine, even though the file does not appear as it should in the default listing.

So strange... Anyone any ideas? Thanks!!

You're welcome, thanks.

Concerning your original question: note that ports below 1024 are considered privileged ports. On most systems now, privileged ports can't be bound to non-root processes.

Concerning edit 1 & 2: there is no sorting options from the server, and I will probably never implement such kind of feature as like you said, you can sort and filter in "New Games" section. You'are not really supposed to install titles from the "File Browser".

Concerning edit 3: It looks like it is a file extension filtering issue. In your screenshot, I can see *.xcz files, by default xcz files are not served and I guess you didn't update your config file to support them (see "AllowedExt" property). Feel free to open a GITHUB issue to request for the support of *.xcz files by default :wink:
 
You're welcome, thanks.

Concerning your original question: note that ports below 1024 are considered privileged ports. On most systems now, privileged ports can't be bound to non-root processes.

Concerning edit 1 & 2: there is no sorting options from the server, and I will probably never implement such kind of feature as like you said, you can sort and filter in "New Games" section. You'are not really supposed to install titles from the "File Browser".

Concerning edit 3: It looks like it is a file extension filtering issue. In your screenshot, I can see *.xcz files, by default xcz files are not served and I guess you didn't update your config file to support them (see "AllowedExt" property). Feel free to open a GITHUB issue to request for the support of *.xcz files by default :wink:
Thanks again for your continuing support! It's greatly appreciated.

Regarding edit 3: it is true the are xcz files not showing, but also multiple nsp files fail to show. In my photo "A Highland song" and "Adore" for example.

Thanks again!
 

Site & Scene News

Popular threads in this forum