|
|
|
@ -2,7 +2,7 @@ from pyngrok import ngrok, conf, exception
|
|
|
|
|
|
|
|
|
|
|
|
def connect(token, port, region):
|
|
|
|
def connect(token, port, region):
|
|
|
|
account = None
|
|
|
|
account = None
|
|
|
|
if token == None:
|
|
|
|
if token is None:
|
|
|
|
token = 'None'
|
|
|
|
token = 'None'
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if ':' in token:
|
|
|
|
if ':' in token:
|
|
|
|
@ -14,7 +14,7 @@ def connect(token, port, region):
|
|
|
|
auth_token=token, region=region
|
|
|
|
auth_token=token, region=region
|
|
|
|
)
|
|
|
|
)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if account == None:
|
|
|
|
if account is None:
|
|
|
|
public_url = ngrok.connect(port, pyngrok_config=config, bind_tls=True).public_url
|
|
|
|
public_url = ngrok.connect(port, pyngrok_config=config, bind_tls=True).public_url
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
public_url = ngrok.connect(port, pyngrok_config=config, bind_tls=True, auth=account).public_url
|
|
|
|
public_url = ngrok.connect(port, pyngrok_config=config, bind_tls=True, auth=account).public_url
|
|
|
|
|