forked from tildeverse/ttm.sh
Merge branch 'master' of aewens/0x0 into master
This commit is contained in:
commit
fd78aabe07
6
fhost.py
6
fhost.py
|
@ -236,6 +236,12 @@ def store_url(url, addr):
|
||||||
if is_fhost_url(url):
|
if is_fhost_url(url):
|
||||||
return segfault(508)
|
return segfault(508)
|
||||||
|
|
||||||
|
# handler to convert gopher links to HTTP(S) proxy
|
||||||
|
gopher = "gopher://"
|
||||||
|
if url[:len(gopher)] = gopher:
|
||||||
|
address = url.split(gopher, 1)[1]
|
||||||
|
url = "https://gopher.tilde.team/{}".format(address)
|
||||||
|
|
||||||
h = { "Accept-Encoding" : "identity" }
|
h = { "Accept-Encoding" : "identity" }
|
||||||
r = requests.get(url, stream=True, verify=False, headers=h)
|
r = requests.get(url, stream=True, verify=False, headers=h)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue