CanaryAAC

What is CanaryAAC:

What is CanaryAAC
  • CanaryAAC is a free and open-source Automatic Account Creator (AAC) written in MVC-PHP. It supports only MySQL databases.

Infos:

  • Fully Object Oriented

  • Model/View/Controller (MVC)

  • Middlewares

  • API

  • Composer

    • Fast Route

    • PhpDotEnv

    • Twig

    • Google2FA

    • GuzzleHttp

    • DiscordPHP

    • PagSeguro

    • PayPal

    • MercadoPago

  • Using .env to configure

Credits:

Lucas Giovanni and OpenTibiaBR Contributors (https://github.com/opentibiabr/canaryaac)

Github:

Github

Image:

Image

Getting Started:

Linux

Nginx Config:

  • In the terminal type the following command:

sudo rm /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/conf.d/default.conf
  • Configure leaving it this way:

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www/html;

        index index.html index.php index.htm index.nginx-debian.html;

        server_name _;

        location / {
                try_files $uri $uri/ /index.php?$query_string;
         }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php8.2-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }

        location ~ /\.ht {
                deny all;
        }
}
sudo nginx -t
sudo systemctl reload nginx

Database:

  • Go to phpMyAdmin.

  • Import the schema.sql that is in the Canary Server folder.

  • Import the canaryaac.sql that is available below:

Canary config.lua:

Install CanaryAAC:

  • cd ~
    sudo git clone https://github.com/opentibiabr/canaryaac.git
    sudo mv canaryaac/* /var/www/html
    sudo rm -rf canaryaac
    sudo chown -R www-data:www-data /var/www/html
    cd /var/www/html
    sudo chmod 755 -R . && sudo chmod 755 -R app/ includes/ resources/ routes/ vendor/
  • Env file:

  • cd /var/www/html
    sudo nano .env
  • Configure .env file with the informations below:

  • URL='http://127.0.0.1'
    SERVER_PATH='/home/<your-user>/Canary/'
    
    # Database connection
    DB_HOST='127.0.0.1'
    DB_NAME='canary'
    DB_USER='your-user'
    DB_PASS='your-password'
    DB_PORT='3306'
    
    # Website configs
    MAINTENANCE=false
    DEV_MODE=true
    
    # PagSeguro
    PAGSEGURO_EMAIL=''
    PAGSEGURO_TOKEN=''
    
    # Mercado Pago
    MERCADOPAGO_TOKEN=''
    MERCADOPAGO_KEY=''
    MERCADOPAGO_CLIENTID=''
    MERCADOPAGO_SECRET=''
    
    # Paypal
    PAYPAL_CLIENTID=''
    PAYPAL_SECRET=''
    
    # Mail
    MAIL_SMTP='smtp://localhost'
    MAIL_WEB='contact@canaryaac.com'
    
    # Outfits Folder
    OUTFITS_FOLDER='/resources/images/charactertrade/outfits'
  • Save the file.

  • Open CanaryAAC:

  • http://127.0.0.1 (for localhost).

  • http://domain-or-ip.

Windows

Web Packages:

  • Example .env file:

  • URL='http://127.0.0.1'
    SERVER_PATH='C:/OpenTibiaBR/Canary/'
    
    # Database connection
    DB_HOST='127.0.0.1'
    DB_NAME='canary'
    DB_USER='your-user'
    DB_PASS='your-password'
    DB_PORT='3306'
    
    # Website configs
    SITE_NAME=CanaryAAC
    MAINTENANCE=false
    DEV_MODE=true
    MULTI_WORLD=false # not ative
    
    # PagSeguro
    PAGSEGURO_EMAIL=''
    PAGSEGURO_TOKEN=''
    
    # Mercado Pago
    MERCADOPAGO_TOKEN=''
    MERCADOPAGO_KEY=''
    MERCADOPAGO_CLIENTID=''
    MERCADOPAGO_SECRET=''
    
    # Paypal
    PAYPAL_CLIENTID=''
    PAYPAL_SECRET=''
    
    # Mail
    MAIL_SMTP='smtp://localhost'
    MAIL_WEB='contact@canaryaac.com'
    
    # Outfits Folder
    OUTFITS_FOLDER='/resources/images/charactertrade/outfits'
  • Examples of IP in the client:

  • http://127.0.0.1/api/v1/login

  • http://127.0.0.1:8080/api/v1/login

  • http://127.0.0.1:8090/api/v1/login

  • http://domain-or-ip/api/v1/login

How to connect with CanaryAAC:

Canary

Client 13:

  • Edit the client and change the IP like in a example below:

  • http://127.0.0.1/api/v1/login

  • http://127.0.0.1:8080/api/v1/login

  • http://127.0.0.1:8090/api/v1/login

OTClient Redemption:

  • modules/corelib/http.lua:

local is_json = true
  • Login with account @god/god or your own account email and password;

  • Server: http://127.0.0.1/api/v1/login or your http://domain-or-ip/api/v1/login;

  • Client Version: 1340;

  • Port: 80.

Last updated