smogon / pokemon-showdown-client

The client for Pokémon Showdown
http://pokemonshowdown.com
GNU Affero General Public License v3.0
560 stars 786 forks source link

play on entirely offline in the future #1976

Closed nongchangnongchang closed 1 year ago

nongchangnongchang commented 2 years ago

my english is bad and it it my first issue in the github,i dont know entirely the issue standardly will be.I build and run the pokemon-showdown-client、pokemon-showdown、dramamine/leftovers-again(a kind of ps battle bot) on the localhost,except the login and register,all of them run successfully offline,is there a certain way to build and run my different login server locally(i dont care about the security,because it will only play by me offline.it works offlline,its ok),i am still reading these project's code to solve the question,maybe i will answer the question myself in the future.

nongchangnongchang commented 2 years ago

crazy,i made it.i can battle offline in lan now.In memory,the most inmemory are these,let rsa openssl verity go true(there are some unknown question in verity,i dont know where i made wrong,so i Annotated the return when verity go false),i add some package,apache2,php7,php7-pdo,php7-pdo_mysql.php7-mysqli,php7-ctype,php7-mbstring and so on.second,ntbb-session-lib.php go wrong because the config/config.ini.js need add a 'rsa private key pmt format' after comma.add ssl module success in apache2.4.47.And a lot of things which i just done a moment ago but i forgot.maybe i will sort there and post in the future.

Slayer95 commented 2 years ago

If you don't "care" about security, you might as well do without the login server by disabling user verification from the sim server config, which also happens to be safe by restricting privileges. https://github.com/smogon/pokemon-showdown/blob/master/config/config-example.js#L413-L421

As you have found, it's also possible to build the login server or develop a different implementation. As per the README, no instructions are provided for that, but in principle it requires deploying your own key pairs in order to stay safe. I can't tell at a glance if your approach has followed that, though.