Coder Social home page Coder Social logo

matthewl246 / pretendo-docker Goto Github PK

View Code? Open in Web Editor NEW
40.0 4.0 9.0 1.57 MB

An unofficial Docker Compose setup for self-hosting a Pretendo Network server.

Home Page: https://matthewl246.github.io/pretendo-docker/

License: GNU Affero General Public License v3.0

JavaScript 21.57% Shell 78.00% PHP 0.43%
3ds 3ds-homebrew wii-u wii-u-homebrew wiiu wiiu-hacking wiiu-homebrew 3ds-hacks nintendo-hacking nintendo-homebrew

pretendo-docker's People

Contributors

akatsukilevi avatar dependabot[bot] avatar itzswirlz avatar matthewl246 avatar redmine4404 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pretendo-docker's Issues

How to access admin paner from difference service outside the host server

I have setup my pretendo server in a laptop that i use as a server that doesnt have a video output (only CLI), but i want to know how i can access the different administration panel (MongoDB, mitdm) from my pc in my local pc (or a vpn) without exposing all port to the internet.
I have very basics knowledge of docker.

Running MongoDB on a separate server

I've been trying to get the system up and running for about 2 days now, but when I try to run it, I get "Waiting for mongodb to be ready...".
What could this be due to?

Help wanted to add a server.

Hello, i want to add the mincraft server to the pretendo docker project, for now i'm only trying to run a minecraft server with my pretendo docker instance outside a docker environment, after configuring all the environments variable and adding the server to the different script i can start a connection with the server but game thrown me an 106-0102 error (nex error code : Core::Unknown)

The error is caused by a error when the Minecraft server try to communicate to the account server to recover the user password, in the console the Minecraft server says :
http2 error : frame too large, after a bit of digging with wireshark it seem that the account server is sending an http page with the phrase "bad request" or "a web socket request was expected".

So I have two question ?
How to debug it ? The account server is only displaying a few messages, I don't know how to get more log with it and where to search to have an specific error message ?

Is it a generic errors ? Is it like a problem that happen often or there is a well known solution to fix that because I have done probably a thing a thing I shouldn't do. Or is it a very specific problem that only me has encounter and I have to figure out alone ?

I will really appreciate all the help I will receive. I don't want to waste anybody's time.

Best regards, redmine4404.

PS. Sorry for my bad English.

Bug file gm9

I have a bug where when I run the script on gm9, I get "line 179: mount fail imgmount $[KEY_DB]"

Changing mongodb version

Hello, I have an older system which does not support AVX which mongodb requires from version 5.0 <=. I am not very good with docker or mongodb and i was wondering if someone could help me change the version of mongodb used in the scripts. I tried to initalise the container myself and exclude the mongodb script from the setup.sh file with no real success. Thank you in advance.

Alternate Patches

hi, its me again. I was wondering if you can compile a patch for external users. I have my Wii U on the same LAN as my server and i want to have friends from WAN to join, but i cant seem to compile another patch on a different ip (the public ip). is this possible?

Eshop planned?

Is it planned to try to solve some kind of shop so you can download games from there or what does the plan look like?

Splatoon?

Pretendo's splatoon server repo seems to have not been updated for a good year, and appears discontinued, but i'm not sure if there's a newer version of it somewhere. Is adding it feasible to the docker env?

Error when running setup.sh

When running the setup.sh command through terminal on macOS, I get this output from terminal.

Error: The script ./setup.sh exited unexpectedly because an error occurred.
./setup.sh: line 97, in main
parse_arguments "$@"
/Users/myname/pretendo-docker/scripts/internal/framework.sh: line 364, in parse_arguments
for variable in "${argument_variables[@]}"; do
((i >= 0)): exited with code 2

When i try to connect co mario maker DNS error.

I have setup my own pretendo server on a separate laptop that i use like a server and cemu to test it, and when i want to go to the world stage section of mario maker (wii u, EUR) i have a errEula pop up with the error code 106-520 (Transport::DnsError), when i close it, the game just say lock to the "please wait" screen. the mitmprxy show that only these request are made.
image

General Roadmap and Plans

My plans for this project

This issue will serve as my plans/roadmap/to-do list for this project.

Small tasks

  • Create backup and restore scripts for volumes: definitely MongoDB, Postgres, and MinIO; maybe mitmproxy and Redis
  • Ensure NNCS traffic is forwarded to the official Pretendo servers
  • Set up a compose.ci.yml to override container restart and ports configuration in CI instead of yq eval
  • Migrate from server.local.env to a global .env file
  • Fix some infinite loops in the setup scripts, improve error handling in that case
  • Create a small update script that resets submodules, pulls, and re-runs the setup script
  • Create a full reset script that removes all changes to the repo and backs up and deletes the Docker volumes
  • Separate out internal scripts into scripts/internal vs ones that can be run by themselves
  • Stop recommending creating a nintendo slot with the GM9 script, Nimbus with the pretendo_official slot is fine
  • Make backing up before restoring with the friends account switcher optional
  • Recommend the Wii U account swap homebrew for switching users
  • Get Wii U account settings to work
  • More script refactoring: load environment variables function, move more things from setup.sh to individual scripts, check for other stuff that is copy/pasted
  • Fix the Node.js servers taking 10 seconds to restart every time
  • Look into creating a proxy autoconfig file, which might be useful for connecting with browsers
  • Use Pretendo logger inside run-in-container scripts
  • Switch from MailDev to MailPit
  • Clearly show when a script fails so people can't accidentally ignore it
  • Create a script for generating account.dat and Cemu online files, try using GabIsAwesome/accountfile-generator
  • Switch from Redis to Valkey, as it is being used in prod
  • Test the scripts in CI

Larger tasks

  • Set up the Docusaurus documentation website: #66
    • Rewrite the readme to be more of a readme than documentation
    • Generate the documentation automatically on push
  • Improve script option parsing (check this)
    • Add a global --help option, manage options centrally and generate help text using add_option() in function-lib
    • Add a global --verbose option to run commands with more output, add run_verbose() to function-lib
    • Add a --force option to bypass prompts
    • Basically, rewrite all the scripts to use this and allow bashisms
  • Add more options to the "frontend" networking
    • mitmproxy in proxy mode, useful for consoles and emulators, don't forward nginx ports for convenience (current)
    • mitmproxy in reverse proxy mode, paired with a DNS server (coredns), useful for exposing a service publicly
    • SSSL mode, using something like the SSSL-DNS Dockerfile to let the console connect directly to nginx with an SSSL certificate: #74
    • The most difficult part is trying to get everything running at the same time. Maybe nginx-sssl => mitmproxy-reverse => nginx => servers? Where does mitmproxy-pretendo come into the chain? Does the 3DS with SSL patches connect directly to nginx-sssl? Should inter-server communication go through mitmproxy-reverse?
  • Reconsider emulator redirection strategies: proxy server is not reliable for Cemu, see #56
    • Might make sense to switch to mitmproxy reverse + DNS strategy
    • Docs will need instructions for switching system DNS server to local or using hosts file as backup. If the user is already using a PiHole this could be even easier!
  • Add Citra setup guide - there was one on Discord already
    • Use the Internet Archived setup guide, does the latest download version work?
    • Importing the friends and account system module save data seemed to work
    • The Pretendo patches do work on Citra
    • Using a local Pretendo server (127.0.0.1 nasc.pretendo.cc and account.pretendo.cc in hosts file) works fine
    • Remember for guide: import the mii maker save data too
  • Check for nex-go-rewrite branches and switch to them
  • Sometimes, the servers change in ways that require database migrations for existing setups. For example, PretendoNetwork/friends#15. This is currently not handled and needs to be done manually or it will cause errors after existing setups update. Add some sort of functionality for this to the update script for migration logic.
  • Some changes that require modifications outside the server, like an update to console CFW or patches. There is no way to communicate that currently, and keeping some sort of state seems complicated.
  • Make the server setup significantly more configurable
    • Allow configuring the IP address of internal/admin services to not just be 127.0.0.1 (use a .env file, Docker Compose supports this)
    • Separate different servers into different Compose files and allow only running some services.
    • Support setups using custom domains instead of a proxy server

More servers

  • Internal Pretendo admin panel (disabled by default)
  • Eshop stuff? (Grove Eshop UI and SOAP NUS). It would be cool to run this since Pretendo will probably never run it themselves publicly, but what would you do with it? No real point in serving homebrew apps.
  • Basically all of the public game servers
  • Alternate Miiverse servers: Rverse and/or Aquamarine

Long-term goals

  • In general, making this a usable development environment instead of (or as well as) a self-hosting setup
    • Don't require a devcontainer workflow - set up host.docker.internal
    • Port-forward everything necessary for locally running another server and write the secrets
    • Contribute the patches upstream to the Pretendo servers
    • Document development using the 2 workflows - devcontainers or running the service on the host
    • Make all of the host-based routing in the individual servers optional, use ports for subdomains instead
  • Get an infrastructure developer to review the configuration and scripts for issues
  • Discuss with the Pretendo developers about making this the official Pretendo Network selfhosting/development environment
  • Potentially, migrate from Bash scripts to a full server management CLI application

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.