File size: 3,366 Bytes
1a1e2eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1fa270a
1a1e2eb
 
 
 
 
68fdacf
1fa270a
1a1e2eb
 
 
 
 
 
 
3a67739
 
9a92ff5
 
 
1a1e2eb
 
 
8359204
 
 
1a1e2eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8359204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7f1478e
 
 
 
 
 
 
 
 
 
1a1e2eb
 
 
 
 
 
 
 
7ff1595
3a67739
1a1e2eb
 
 
 
1fa270a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# =============================================================
# Rename this file to config.env before using
# =============================================================

####################
## REQUIRED SETTINGS
####################

# Telegram API credentials (from https://my.telegram.org/apps)
API_ID=0 # Example: 1234567
API_HASH="" # Example: "abc123def456"

# Bot token (from @BotFather)
BOT_TOKEN="" # Example: "123456789:ABCdef..."

# Storage channel ID (create a channel and add bot as admin)
BIN_CHANNEL=0 # Example: -1001234567890

# Owner information (get ID from @userinfobot)
OWNER_ID=0 # Your Telegram user ID. Example: 123456789

# Database connection string
DATABASE_URL="" # Example: "mongodb+srv://user:pass@host/db"

# Deployment configuration
FQDN="" # Your domain name
HAS_SSL="True" # Set to "True" if using HTTPS
PORT=8080 # Web server port
NO_PORT="True" # Hide port in URLs ("True" or "False")

####################
## OPTIONAL SETTINGS
####################

MAX_BATCH_FILES=50

# Set bot commands on startup (True/False)
SET_COMMANDS="True"

# Force users to join a specific channel before using the bot
FORCE_CHANNEL_ID="" # Example: -1001234567890 (Leave empty if not needed)

# Allow processing of channel messages (True/False)
CHANNEL="False"

# Banned channels (files from these channels will be rejected)
BANNED_CHANNELS="" # Example: "-1001234567890 -100987654321" (Space-separated IDs, leave empty if none)

# Multiple bot tokens (can add up to MULTI_TOKEN49) # Example: MULTI_TOKEN49="123456789:ABCdef..."
MULTI_TOKEN1=""

####################
## TOKEN SYSTEM SETTINGS
####################

# Enable token-based access (True/False)
TOKEN_ENABLED="False"

# Default token validity in hours
TOKEN_TTL_HOURS="24"

####################
## URL SHORTENER SETTINGS
####################

# Enable URL shortening for tokens (True/False)
SHORTEN_ENABLED="False"

# Enable URL shortening for media links (True/False)
SHORTEN_MEDIA_LINKS="False"

# URL Shortener
URL_SHORTENER_API_KEY="" # Example: "abc123def456"
URL_SHORTENER_SITE="" # Example: "example.com"

####################
## GLOBAL RATE LIMITING SETTINGS
####################

# Enable global rate limiting (True/False)
GLOBAL_RATE_LIMIT="False"

# Maximum number of requests allowed across all users per minute
MAX_GLOBAL_REQUESTS_PER_MINUTE=4

####################
## RATE LIMITING SETTINGS
####################

# Enable rate limiting (True/False)
RATE_LIMIT_ENABLED="False"

MAX_FILES_PER_PERIOD=2

# Time window in minutes for rate limiting
RATE_LIMIT_PERIOD_MINUTES=1

# Maximum number of requests that can be queued.
MAX_QUEUE_SIZE=100

####################
## UPDATE SETTINGS
####################

# Git repository for updates
UPSTREAM_REPO="https://github.com/fyaz05/FileToLink"

# Branch to update from
UPSTREAM_BRANCH="main" # Default branch for updates

####################
## ADVANCED SETTINGS (modify with caution)
####################

# Application name
NAME="ThunderF2L" # Bot application name

# Performance settings
SLEEP_THRESHOLD=600 # Sleep time in seconds
WORKERS=8 # Number of worker processes

# Web server configuration
BIND_ADDRESS="0.0.0.0" # Listen on all network interfaces
PING_INTERVAL=840 # Ping interval in seconds