File size: 615 Bytes
9287a32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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"#'2YypH9d2VXVL78HxF7g0lintH17_2GbtkFNFFngUkTZcyQ4SD'
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() |