custom subdomain for serveo

This commit is contained in:
Usama Abdul Sattar 2018-12-06 18:53:15 +05:00 committed by GitHub
parent 50d8f62d67
commit 803604b892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,10 +102,12 @@ def runNgrok():
break break
def runServeo(): 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) sleep(7)
try: 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") 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 {0}[{1}*{0}]{1} SERVEO URL: {2}".format(RED, DEFAULT, GREEN) + url + "{1}".format(RED, DEFAULT, GREEN))
print("\n") print("\n")