# mohammadpatel070101-cmyk/uid-bypass architecture

> Architecture diagram of the GitHub repository mohammadpatel070101-cmyk/uid-bypass, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohammadpatel070101-cmyk/uid-bypass
- Repository: https://github.com/mohammadpatel070101-cmyk/uid-bypass

## Overview

This repository is a Free Fire login-traffic interception and UID-authorization tool, accompanied by a web dashboard and phone/emulator protocol-analysis utilities. The main workflow is a client login passing through a mitmproxy interceptor, which checks UID authorization and can rewrite encrypted login payloads before forwarding them; response handling extracts login identity and records outcomes. The dashboard manages local UIDs, proxy state, statistics, and logs. Source excerpts are partial and the README is empty, so uncertain wiring is omitted; capture and comparison flows are included only where their source descriptions support them.

Main entry points: [`main.py`](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/main.py) (Main interceptor), [`adii_main.py`](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/adii_main.py) (Web dashboard), [`interceptor.py`](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/interceptor.py) (UID authorization), [`capture_phone.py`](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/capture_phone.py) (Phone capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_proxy["Login proxy"]
  node_main_proxy["Main interceptor<br/>[main.py]"]
  node_alt_proxy["Interceptor variant<br/>[interceptor.py]"]
  node_auth["UID authorization<br/>[interceptor.py]"]
  node_rewrite["Login payload rewrite<br/>[interceptor.py]"]
  node_region["Region mapping<br/>[regions.py]"]
end

subgraph group_admin["Access and monitoring"]
  node_dashboard["Web dashboard<br/>[adii_main.py]"]
  node_uid_file["Local UID list<br/>[uid.txt]"]
  node_login_db[("Login records and stats<br/>[bot_data.db]")]
  node_template["Dashboard page<br/>[index.html]"]
end

subgraph group_analysis["Protocol analysis"]
  node_phone_capture["Phone capture<br/>[capture_phone.py]"]
  node_emulator_capture["Emulator capture"]
  node_captures["Captured protos"]
  node_proto_diff["Proto comparison<br/>[diff_protos.py]"]
end

subgraph group_core["Protocol utilities"]
  node_proto_utils["Crypto and protobuf<br/>[utils.py]"]
end

node_client(("Game client"))
node_proxy_server(("Game login server"))
node_dashboard_user(("Dashboard operator"))
node_firebase(("Firebase UID service"))

node_client -->|"sends login traffic"| node_main_proxy
node_main_proxy -->|"forwards requests"| node_proxy_server
node_main_proxy -->|"checks UID"| node_auth
node_auth -->|"reads local UIDs"| node_uid_file
node_auth -->|"checks remote UIDs"| node_firebase
node_main_proxy -->|"rewrites login payload"| node_rewrite
node_main_proxy -->|"records outcomes"| node_login_db
node_dashboard_user -->|"manages proxy and UIDs"| node_dashboard
node_dashboard -->|"updates local UIDs"| node_uid_file
node_dashboard -->|"checks UID"| node_firebase
node_dashboard -->|"reads stats and logs"| node_login_db
node_dashboard -->|"renders page"| node_template
node_dashboard -->|"starts or stops"| node_alt_proxy
node_alt_proxy -->|"uses crypto and protobuf"| node_proto_utils
node_main_proxy -.->|"uses region config"| node_region
node_client -.->|"provides phone traffic"| node_phone_capture
node_client -.->|"provides emulator traffic"| node_emulator_capture
node_phone_capture -->|"decrypts and parses"| node_proto_utils
node_emulator_capture -->|"decrypts and parses"| node_proto_utils
node_phone_capture -->|"writes phone protos"| node_captures
node_emulator_capture -->|"writes emulator protos"| node_captures
node_proto_diff -->|"reads captured protos"| node_captures

click node_main_proxy "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/main.py"
click node_alt_proxy "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/interceptor.py"
click node_auth "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/interceptor.py"
click node_rewrite "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/interceptor.py"
click node_region "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/config/regions.py"
click node_dashboard "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/adii_main.py"
click node_uid_file "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/uid.txt"
click node_login_db "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/bot_data.db"
click node_template "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/templates/index.html"
click node_phone_capture "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/capture_phone.py"
click node_emulator_capture "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/capture_emulator.py"
click node_proto_diff "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/diff_protos.py"
click node_proto_utils "https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/common/utils.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main_proxy,node_alt_proxy,node_auth,node_rewrite,node_region,node_client toneBlue
class node_dashboard,node_uid_file,node_login_db,node_template toneAmber
class node_phone_capture,node_emulator_capture,node_captures,node_proto_diff,node_proxy_server toneMint
class node_proto_utils toneRose
class node_dashboard_user,node_firebase toneIndigo
```

## Components

### Login proxy

- [Main interceptor](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/main.py): `main.py`
- [Interceptor variant](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/interceptor.py): `interceptor.py`
- [UID authorization](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/interceptor.py): `interceptor.py`
- [Login payload rewrite](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/interceptor.py): `interceptor.py`
- [Region mapping](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/config/regions.py): `config/regions.py`

### Access and monitoring

- [Web dashboard](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/adii_main.py): `adii_main.py`
- [Local UID list](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/uid.txt): `uid.txt`
- [Login records and stats](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/bot_data.db): `bot_data.db`
- [Dashboard page](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/templates/index.html): `templates/index.html`

### Protocol analysis

- [Phone capture](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/capture_phone.py): `capture_phone.py`
- [Emulator capture](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/capture_emulator.py): `capture_emulator.py`
- **Captured protos**
- [Proto comparison](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/diff_protos.py): `diff_protos.py`

### Protocol utilities

- [Crypto and protobuf](https://github.com/mohammadpatel070101-cmyk/uid-bypass/blob/main/common/utils.py): `common/utils.py`

### Other components

- **Game client**
- **Game login server**
- **Dashboard operator**
- **Firebase UID service**

## Connections

- Game client → Main interceptor: sends login traffic
- Main interceptor → Game login server: forwards requests
- Main interceptor → UID authorization: checks UID
- UID authorization → Local UID list: reads local UIDs
- UID authorization → Firebase UID service: checks remote UIDs
- Main interceptor → Login payload rewrite: rewrites login payload
- Main interceptor → Login records and stats: records outcomes
- Dashboard operator → Web dashboard: manages proxy and UIDs
- Web dashboard → Local UID list: updates local UIDs
- Web dashboard → Firebase UID service: checks UID
- Web dashboard → Login records and stats: reads stats and logs
- Web dashboard → Dashboard page: renders page
- Web dashboard → Interceptor variant: starts or stops
- Interceptor variant → Crypto and protobuf: uses crypto and protobuf
- Main interceptor → Region mapping: uses region config
- Game client → Phone capture: provides phone traffic
- Game client → Emulator capture: provides emulator traffic
- Phone capture → Crypto and protobuf: decrypts and parses
- Emulator capture → Crypto and protobuf: decrypts and parses
- Phone capture → Captured protos: writes phone protos
- Emulator capture → Captured protos: writes emulator protos
- Proto comparison → Captured protos: reads captured protos
