Files
3pmonitor/app/config.py
Junaid Saeed Uppal 85f44e6a22 Initial commit: Teen Patti live monitor with analytics
Live dashboard with real-time WebSocket updates, analytics page with
time-filtered stats, ClickHouse storage, and Caddy reverse proxy.
2026-02-21 22:36:40 +05:00

44 lines
1.4 KiB
Python

import os
# StreamKar API constants (from decompiled APK)
ACCESS_KEY_ID = "cBdjSuFA3gi9Y92wKcCilh9NeloE"
SK_KIMI = "dsgafoaodhafpdnfopauifda352176sn"
APP_ID = 1
VERSION_CODE = 1337
VERSION_NAME = "9.18.0"
PLATFORM = 2
CHANNEL_CODE = "12002"
API_BASE = "https://api.loee.link"
SOCKET_BASE = "https://into1.loee.link"
API_ENTRANCE = f"{API_BASE}/meShow/entrance"
API_URL = "https://web.kktv9.com/meShowApi"
DEFAULT_ROOM_ID = 668797247
POLL_INTERVAL = 1.0
# sv signature constants
EM5_SALT = "cc16be4b:346c51d"
EM5_ALPHABET = "AB56DE3C8L2WF4UVM7JRSGPQYZTXK9HN"
# MsgTags
MSGTAG_ROOM_LOGIN = 10010201
MSGTAG_LOGIN_ACK = 10010202
MSGTAG_GAME_WIN = 10010778
MSGTAG_USER_BET = 10010795
# Game constants
SUITS = {1: "\u2660", 2: "\u2665", 3: "\u2663", 4: "\u2666"}
VALUES = {1: "A", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7",
8: "8", 9: "9", 10: "10", 11: "J", 12: "Q", 13: "K", 14: "A"}
HAND_TYPES = {1: "High Card", 2: "Pair", 3: "Flush", 4: "Straight",
5: "Straight Flush", 6: "Trail"}
CHAIRS = {1: "A", 2: "B", 3: "C"}
STATUS_NAMES = {0: "NEW", 1: "BETTING", 2: "REVEALING", 3: "ENDED"}
# Environment
CLICKHOUSE_HOST = os.environ.get("CLICKHOUSE_HOST", "localhost")
CLICKHOUSE_PORT = int(os.environ.get("CLICKHOUSE_PORT", "8123"))
SK_CREDENTIALS_FILE = os.environ.get("SK_CREDENTIALS_FILE", "sk_credentials.json")
WEB_PORT = int(os.environ.get("WEB_PORT", "8765"))