Mrlongpro commited on
Commit
c894c0a
1 Parent(s): 0b715fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -9,9 +9,27 @@ import telebot
9
  from telebot import apihelper
10
  import zipfile
11
  from pathlib import Path
 
12
 
13
  # Initialize Telegram bot
14
- apihelper.API_URL = "http://0.0.0.0:7860/bot{0}/{1}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  bot = telebot.TeleBot("6637723515:AAGfwpKEh0Vgw8hZkTZq8MohIFwR6LdKX9I", parse_mode=None)
16
 
17
  def run_scripts(target, source):
 
9
  from telebot import apihelper
10
  import zipfile
11
  from pathlib import Path
12
+ import socks
13
 
14
  # Initialize Telegram bot
15
+ proxy_server = '142.93.68.63'
16
+ proxy_port = 2434
17
+ proxy_secret = 'ee32b920dffb51643028e2f6b878d4eac1666172616b61762e636f6d'
18
+ proxy_dc_id = 2 # This is usually 2 for MTProto proxies
19
+
20
+ proxy = (
21
+ socks.SOCKS5,
22
+ proxy_server,
23
+ proxy_port,
24
+ True,
25
+ 'vpn',
26
+ 'unlimited'
27
+ )
28
+ #apihelper.API_URL = "http://0.0.0.0:7860/bot{0}/{1}"
29
+ # Set the proxy for the bot if needed
30
+ apihelper.proxy = {
31
+ 'https': f'socks5://vpn:unlimited@{PROXY_SERVER}:{PROXY_PORT}'
32
+ }
33
  bot = telebot.TeleBot("6637723515:AAGfwpKEh0Vgw8hZkTZq8MohIFwR6LdKX9I", parse_mode=None)
34
 
35
  def run_scripts(target, source):