fix(tgapp): remove hardcoded proxy default, use mykey.py config instead

The proxy was hardcoded to http://127.0.0.1:2082 which breaks for users
without a local proxy (e.g. international users with direct access).
Now defaults to None; users who need a proxy can set it in mykey.py.
This commit is contained in:
Liang Jiaqing
2026-04-24 17:30:48 +08:00
parent 888ce2f9bb
commit ee899d4dd5

View File

@@ -371,7 +371,7 @@ if __name__ == '__main__':
sys.stdout = sys.stderr = _logf
print('[NEW] New process starting, the above are history infos ...')
threading.Thread(target=agent.run, daemon=True).start()
proxy = mykeys.get('proxy', 'http://127.0.0.1:2082')
proxy = mykeys.get('proxy', None) # set 'proxy' in mykey.py if needed, e.g. 'http://127.0.0.1:2082'
print('proxy:', proxy)
async def _error_handler(update, context: ContextTypes.DEFAULT_TYPE):