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:
@@ -371,7 +371,7 @@ if __name__ == '__main__':
|
|||||||
sys.stdout = sys.stderr = _logf
|
sys.stdout = sys.stderr = _logf
|
||||||
print('[NEW] New process starting, the above are history infos ...')
|
print('[NEW] New process starting, the above are history infos ...')
|
||||||
threading.Thread(target=agent.run, daemon=True).start()
|
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)
|
print('proxy:', proxy)
|
||||||
|
|
||||||
async def _error_handler(update, context: ContextTypes.DEFAULT_TYPE):
|
async def _error_handler(update, context: ContextTypes.DEFAULT_TYPE):
|
||||||
|
|||||||
Reference in New Issue
Block a user