You can add a tor reference link
This commit is contained in:
parent
5cdb9bf44c
commit
e2b1486ea1
2 changed files with 28 additions and 1 deletions
|
@ -92,6 +92,13 @@ def head(title="", description="", image="", config={}, author=""):
|
|||
|
||||
"""
|
||||
|
||||
# Tor tags.
|
||||
|
||||
tor = config.get("tor", "")
|
||||
if tor:
|
||||
if not tor.startswith("http://"): tor = "http://"+tor
|
||||
html = html + '<meta http-equiv="onion-location" content="'+tor+'" />'
|
||||
|
||||
html = html + """
|
||||
|
||||
<!-- This meta tag is needed for pretty rendering on phones -->
|
||||
|
|
|
@ -83,7 +83,17 @@ def Set():
|
|||
Domain(domain)
|
||||
|
||||
except Exception as e:
|
||||
print(clr["bold"]+clr["tdrd"]+"Error:"+clr["norm"]+" Didn't specify the domain.", e)
|
||||
print(clr["bold"]+clr["tdrd"]+"Error:"+clr["norm"]+" Didn't specify the domain.")
|
||||
print('Use: $ python3 run.py --set --domain blenderdumbass.org')
|
||||
|
||||
if "--tor" in sys.argv:
|
||||
try:
|
||||
domain = sys.argv[ sys.argv.index("--tor") + 1]
|
||||
if "--" in domain: 1/0 # Failing this for the error message.
|
||||
Tor(domain)
|
||||
|
||||
except Exception as e:
|
||||
print(clr["bold"]+clr["tdrd"]+"Error:"+clr["norm"]+" Didn't specify the tor domain.")
|
||||
print('Use: $ python3 run.py --set --domain blenderdumbass.org')
|
||||
|
||||
|
||||
|
@ -167,6 +177,16 @@ def Domain(domain):
|
|||
|
||||
print(clr["bold"]+clr["tbyl"]+domain+clr["norm"]+" is set as domain.")
|
||||
|
||||
def Tor(domain):
|
||||
|
||||
data = Load()
|
||||
data["tor"] = domain
|
||||
|
||||
Save(data)
|
||||
|
||||
print(clr["bold"]+clr["tbyl"]+domain+clr["norm"]+" is set as tor domain.")
|
||||
|
||||
|
||||
def Port(port):
|
||||
|
||||
data = Load()
|
||||
|
|
Loading…
Add table
Reference in a new issue