Giter VIP home page Giter VIP logo

shanten-number's Introduction

Instructions

Please run this project under the latest 16.X.X LTS version of Node.js.
Due to the limitation of Node package "http-mitm-proxy", Node version should not be later than 16.
Date: 2023/03/22
Latest: 16.19.1
Use of NVM for Node version control is recommended.

Download

This project contains too much historical data that do not contribute to current functions.
To faster the download process, please run:

git clone [email protected]:RikaShiro/FYP22070.git --depth=1

Install

Chinese users will probably get error when downloading "Sharp" package.
Set Chinese mirror hosted at Alibaba for "Sharp" before install node packages.
For Chinese users, run:

npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"
npm install

For international users, run:

npm install

Prepare

1. Tables

npm run init

2 Tables are required: 'shanten' and 'enumerations'.
There are 2 options to set up the project before actually serving.

  1. Unzip the pre-downloaded tables.
  2. Compute the tables your own, which takes around 2 minutes (CPU multi-threading).

2. opencv.js

This project makes use of opencv.js.
The official copy is available at https://docs.opencv.org/${version}/opencv.js
Currently, version 4.7.0 is attached.

3. liqi.json

liqi.json defines the actions at maj-soul.com.
It is necessary for websocket messages decode, since the game uses protobuf to exchange information.
This file can be obtained during user login, and should be updated together with the web game client.

4. http-mitm-proxy

node index.js

The command opens up a local proxy server that listens to port 22070. Besides, you have to turn on proxy in your OS setting. For Windows, please config the proxy manually in "proxy setting", for address "127.0.0.1" and port "22070".
At the first time you run the project, it is necessary to trust the certificate of http-mitm-proxy. The certificate path is by default ./.http-mitm-proxy/certs/ca.pem

Serve

npm run serve

It initializes the script and run the proxy on port 22070. The port can be changed in ".env" file.

shanten-number's People

Contributors

rikashiro avatar

Watchers

 avatar

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.