2022-08-07 13:42:41 +05:30
2023-05-29 11:14:20 +05:00
2022-09-24 16:04:44 +05:00
2022-08-07 17:01:23 +05:30
2022-08-07 17:01:23 +05:30
2023-05-30 22:33:13 +05:00

BML Proxy Docker

On April 1, 2022 BML enabled Cloudflares Anti-bot features and all the existing scripts to interact with BML API stopped working. This repo contains build files for a proxy to bypass anti-bot.

Codebase repo:

Installation

  1. Install docker curl -fsSL https://get.docker.com | sudo sh
  2. Give yourself docker group and relogin. sudo usermod -aG docker $USER;sudo su - $USER
  3. Generate ssh key (if you havent already) ssh-keygen
  4. Add your .pub key to my gitea server cat ~/.ssh/id_*.pub
  5. Clone the repo git clone git@git.shihaam.dev:shihaam/bml-proxy.git
  6. Go to cloned dir cd bml-proxy
  7. Start the docker container docker compose up -d

How to use

This docker image exposes a proxied BML API on localhost port 3030. Any and all requests to the BML API should instead be made to this proxy instead.

BML API URL = https://bankofmaldives.com.mv/internetbanking/api/
Docker Image URL = http://localhost:3030/api/

Best practices on usage:

It is recommded that you use nginx reverse proxy and cloudflare proxy with this for security and compatability reasons

  1. Install Nginx, Certbot, and Nginx Cerbot plugin sudo apt install nginx python3-certbot python3-certbot-nginx
    example nginx config: place this is in a file at "/etc/nginx/sites-enabled"
server {
  server_name SUB.DOMAIN.COM;
  listen 80;
  location / {
    proxy_pass http://localhost:3030;
  }
}
  1. Point your sub.doman.com to server IP (its important you disable cloudflare proxy)
  2. Use certbot to get SSL sudo certbot --nginx -d sub.domain.com
  3. Enable Cloudflare to fix encoding issue.
  4. Use your programs to request to request to this proxy URL instead of BML URL

Example

You would normally hit the following URL to retrieve today's transactions:

https://www.bankofmaldives.com.mv/internetbanking/api/account/{BML_ACCOUNT_NUMBER}/history/today

With this Docker image you will use the following:

https://sub.domain.com/account/{BML_ACCOUNT_NUMBER}/history/today

Disclaimer

This package is no way associated with Bank of Maldives.

I am not responsible for any losses incurred from the use of this package.

Use at your own risk.

Description
No description provided
Readme 1.4 MiB
Languages
Rust 91.9%
Dockerfile 8.1%