feat(network): add proxy support and docker host-gateway configuration
This commit is contained in:
@@ -7,6 +7,7 @@ from db.repository import Repository
|
||||
from core.dedup import compute_content_hash, compute_file_hash
|
||||
from services.ai_processor import AIProcessor
|
||||
from core.metrics import COLLECTED_POSTS_TOTAL
|
||||
from core.proxy import get_telegram_proxy
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -31,7 +32,7 @@ class CollectorService:
|
||||
self.session_name = session_name or os.path.join(SESSION_DIR, "collector.session")
|
||||
os.makedirs(os.path.dirname(self.session_name), exist_ok=True)
|
||||
os.makedirs(MEDIA_DIR, exist_ok=True)
|
||||
self.client = TelegramClient(self.session_name, self.api_id, self.api_hash)
|
||||
self.client = TelegramClient(self.session_name, self.api_id, self.api_hash, proxy=get_telegram_proxy())
|
||||
|
||||
async def start(self):
|
||||
logger.info("Starting Collector Userbot...")
|
||||
|
||||
Reference in New Issue
Block a user