|
from flask import Flask, redirect |
|
import requests |
|
import os |
|
import random |
|
from flask import Flask, redirect |
|
import requests |
|
import os |
|
import subprocess |
|
ngrok_token3 = "2cdw5pJsqgsq1igQKeHIpNwTNG7_7LQD3jojKKQ7PzcnNkok5" |
|
edge3 = "edghts_2czmwh4KcPnhK3tIzfL0Y1aHkha" |
|
command_ngrok = f"ngrok tunnel --label edge={edge3} --authtoken={ngrok_token3} --region=ap http://localhost:5006" |
|
def ngrok_flask(): |
|
try: |
|
while True: |
|
os.system(command_ngrok) |
|
except KeyboardInterrupt: |
|
print("ngrok启动失败") |
|
ngrok_flask() |
|
ngrok_flask() |