GithubHelp home page GithubHelp logo

demonrem / almetica Goto Github PK

View Code? Open in Web Editor NEW

This project forked from almetica/almetica

0.0 0.0 0.0 489 KB

Private server implementation of the MMORPG TERA written in Rust

License: GNU Affero General Public License v3.0

Rust 99.77% PLpgSQL 0.23%

almetica's Introduction

Almetica

Gitter

This is a server for the MMORPG TERA written in rust. Currently targeting TERA EU 93.02.

Requirements

A stable rust installation (version 1.42+).

Building

Developer build:

cargo build

For hardware accelerated AES you will need to use a compatible CPU and this build command:

RUSTFLAGS="-C target-feature=+aes,+ssse3" cargo build

For the best performance (including AES speed improvements) compile the server with the full native instruction set of your CPU:

RUSTFLAGS="-C target-cpu=native" cargo build

Remember to use the --release flag if you want to activate all compiler optimizations.

Configuration

Configure the server with the help of the provided configuration template (config.yaml.tmpl).

You also need some additional files that you need to extract yourself from the TERA client. We will provide tools / instructions how to do so in the future.

You can find these tools yourself though on Github.

integrity.yaml

A YAML file with a list of all packet names that need the integrity check (>= version 93).

Format:

- C_CAST_FISHING_ROD
- C_DIALOG
...

key.yaml

A YAML file with two keys: "key" and "iv". These are the parts of the AES256 key which is used to decrypt the datacenter file. Extracted from the memory while the TERA client is runnig.

Format:

key: E1B1C4666F64681889BC8A5594387E2D
iv: 1F494C6BB424C916CA44BB1C64CEAA41
...

messages.yaml

A YAML file with a list of all system messages in the same order as the client.

Format:

- SMT_UNDEFINED
- SMT_LOBBY_CANNOT_CONNECT
...

opcocode.yaml

A YAML file with a hashmap of the packet name as key and the opcode value as the value as defined in the client.

Format:

C_ACCEPT_CONTRACT: 12345
C_ACCEPT_FRIEND: 67890
...

Running

You can run the server with the following commands:

RUST_LOG=info cargo run --bin almetica

Testing

Since some tests are integration tests that need a postgres database, you need to configure a database connection which will be used for the testing. You need a database user that is allowed to create and delete databases and I recommend just to spin up a docker container for the testing. Don't run the tests against your production database.

The tests will create a randomly named test database so that they can run in parallel.

To configure the database access, please create a .env file in the project root and add a TEST_DATABASE_CONNECTION variable.

Use the format that is documented here:

https://docs.rs/postgres/0.17.2/postgres/config/struct.Config.html

Contributing

Please contacts us in advance if you want to help with the server development so that we don't work on the same stuff at the same time.

Always write tests for the stuff you program. Code without tests will not be included.

FAQ

What are your goals?

Provide a server platform for TERA that gives better performance then the original server while providing the same feature set.

I don't strive to emulate the original TERA server 100% the same. We will optimize / improve functionality where it seems logical (for example stricter validation of client commands).

This server should also act as a way to preserve TERA for the future.

Why didn't you extend already existing server projects:

I had four requirements for the server projects for me to consider continue developing them:

  • Open Source License
  • Some kind of tests (unit / integration test etc.)
  • Written in a compiled and typed language
  • Written with a clear design goal

None of he evaluated existing server projects did fulfilled these requirements.

License

Licensed under AGPL version 3.

The GNU Affero General Public License is based on the GNU GPL, but has an additional term to allow users who interact with the licensed software over a network to receive the source for that program. We recommend that people consider using the GNU AGPL for any software which will commonly be run over a network.

Credits

It's pretty hard to trace the origin of some of the achievements. So I will just credit people without their specific contributions. Most of them did discover specific issues while reverse engineering the TERA network protocol or did some other kind of groundwork that this sever is based on (ordered alphabetically):

alexrp, caali-hackerman, mirrawrs, meishu, P5yl0, pinkiepie

almetica's People

Contributors

almetica 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.