mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-22 07:59:22 +03:00
A bunch of web fixes. Preparing to proxy.
This commit is contained in:
parent
faf34392d8
commit
9f47123717
120
arvo/eyre.hoon
120
arvo/eyre.hoon
@ -10,7 +10,8 @@
|
||||
ged=duct :: client interface
|
||||
ney=@uvI :: rolling entropy
|
||||
dop=(map host ship) :: host aliasing
|
||||
own=(map ship serf) :: live servers
|
||||
own=(map ship serf) :: domestic servers
|
||||
fon=(map ship rote) :: foreign servers
|
||||
ask=[p=@ud q=(map ,@ud ,[p=duct q=hiss])] :: outgoing by number
|
||||
kes=(map duct ,@ud) :: outgoing by duct
|
||||
== ::
|
||||
@ -35,7 +36,11 @@
|
||||
sam=seam :: logical request
|
||||
pez=pest :: request state
|
||||
== ::
|
||||
++ serf :: servant per ship
|
||||
++ rote :: remote server
|
||||
$: rem=[p=@ud q=(map ,@ud ,[p=duct q=httx])] :: active remotes
|
||||
kut=(map duct ,@ud) :: duct returns
|
||||
== ::
|
||||
++ serf :: local server
|
||||
$: pef=@t :: server prefix
|
||||
wup=(map hole cyst) :: secure sessions
|
||||
cah=(map cash vase) :: compilation cache
|
||||
@ -159,7 +164,7 @@
|
||||
?> ?=([~ @ ~] hot)
|
||||
[[sec (rash i.u.hot thor:epur)] p.ryp q.ryp]
|
||||
==
|
||||
(hell pul [p.heq mah s.heq])
|
||||
(hell pul +.fav [p.heq mah s.heq])
|
||||
==
|
||||
::
|
||||
++ doss :: host to ship
|
||||
@ -179,7 +184,7 @@
|
||||
[sas ~[content-type/'text/plain'] [~ (tact str)]]
|
||||
::
|
||||
++ hell :: request, no ship
|
||||
|= [pul=purl moh=moth]
|
||||
|= [pul=purl hyx=httx moh=moth]
|
||||
^+ +>
|
||||
=^ wiq q.q.pul
|
||||
?~ q.q.pul [~ ~]
|
||||
@ -187,19 +192,101 @@
|
||||
=+ gow=(rush i.q.q.pul fed:ag)
|
||||
^- [(unit ship) (list ,@t)]
|
||||
?~(gow [~ q.q.pul] [gow t.q.q.pul])
|
||||
(huff ?^(wiq wiq (doss r.p.pul)) ?=(@ wiq) pul moh)
|
||||
=+ oar=`(unit ship)`?^(wiq wiq (doss r.p.pul))
|
||||
?~ oar
|
||||
(horn pul q.hyx moh)
|
||||
?. (home u.oar)
|
||||
(hork u.oar hyx)
|
||||
(huff u.oar ?=(@ wiq) q.hyx pul moh)
|
||||
::
|
||||
++ home :: do we own?
|
||||
|= who=ship
|
||||
^- ?
|
||||
&
|
||||
::
|
||||
++ hork :: remote request
|
||||
|= [him=ship hyx=httx]
|
||||
^+ +>
|
||||
~& [%hork him]
|
||||
!!
|
||||
::
|
||||
++ horn :: irregular request
|
||||
|= [pul=purl cip=clip moh=moth]
|
||||
^+ +>
|
||||
=- (fail 400 "urbit: url {<pul>} does not match a vessel")
|
||||
^= fac
|
||||
0w89.wgGV4.jAl90.00003.sV4OG.IJjfa.1vYpi.gRxB9.3m6kA.dopig.
|
||||
RxB93.m6kAd.opigR.xB93m.6kAdo.pigRx.B93m6.kAdop.igRxB.93m6k.
|
||||
Adopi.gRxBf.vGSfy.m8hQj.T-DiD.7kqvH.vEpA3.3vH-C.in~Tq.l8U0n.
|
||||
1FVhj.w9E1A.NIF6w.4j9v~.VZ0~B.9flkB.IY90B.-ieSV.Ky8Q~.4~07s.
|
||||
JcXFC.DtI-1.GGz-1.V-olV.g3wsv.ZCQM1.BJbVj.Vwiv0.uo7Gh.4qsxA.
|
||||
92ZYU.tJ5uH.yiIzV.FwvJR.UUq6z.cpKIG.Hck9v.qGDm1.PY2rM.itxLB.
|
||||
fn0Bo.5DO8x.oO7KE.kYh-P.NiKp1.HT88j.Mu3ZK.ciKsU.TnlkV.0Zo77.
|
||||
12ciy.nY3dM.7nDnY.GVgGh.ZllpO.SFHFb.p1Ae0.uUpXV.eqFvS.pkBRl.
|
||||
jv0MP.ilRHP.1HwtK.GFptt.2KdpP.RsYqI.wRHEG.j~LZQ.I06qJ.fP0Pp.
|
||||
77qjo.s0PU0.rGGg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KSMKP.balqk.xjbEH.
|
||||
idkbq.Elo0N.dHjkM.vEBiq.BC-Rb.IKMiB.JiaoS.x3mLy.Jr6P5.ToiS2.
|
||||
gAz4y.qNHiI.k7WIl.9EJGb.iJ2Tp.NQ5H5.VpSni.By-OX.TfvYs.plRic.
|
||||
rpPJD.7xkgk.h9BMw.001EY.XFJDs.CYKpn.1xoTd.HrCAK.tTtT0.6lOon.
|
||||
tQpCZ.jt5x5.t1A00.01UCO.x20ts.d003n.3g00s.RB8s0.A0002.8p0xY.
|
||||
20w82.5h9gD.c4000.0l9ny.s0000.0o8p0.0006g.0001i.h4x93.g0000.
|
||||
Eq2wR.7jB29
|
||||
::
|
||||
++ huff :: request by ship
|
||||
|= [oar=(unit ship) hey=? pul=purl moh=moth]
|
||||
^+ +>
|
||||
|= [our=ship hey=? cip=clip pul=purl moh=moth]
|
||||
=* sec p.p.pul
|
||||
?~ oar
|
||||
(fail 400 "urbit: url does not match a vessel")
|
||||
=+ ^= sef ^- serf
|
||||
=+ suf=(~(get by own) u.oar)
|
||||
=+ suf=(~(get by own) our)
|
||||
?^ suf u.suf
|
||||
=+ sef=*serf
|
||||
sef(pef (cat 3 gub (rsh 3 1 (scot %p u.oar))))
|
||||
sef(pef (cat 3 gub (rsh 3 1 (scot %p our))))
|
||||
=+ ^= saw ^- [p=hole q=cyst]
|
||||
=+ lig=(coss pef.sef q.moh)
|
||||
?^ lig
|
||||
@ -209,11 +296,14 @@
|
||||
:- ses
|
||||
^- cyst
|
||||
:* ^- cred
|
||||
:* [sec hey r.p.pul]
|
||||
:* [sec hey q.p.pul r.p.pul]
|
||||
~
|
||||
(rsh 3 1 (scot %p (end 6 1 (shaf %oryx ses))))
|
||||
~
|
||||
[%& .0.0.0.0]
|
||||
::
|
||||
=+ lag=(~(get by q.moh) %accept-language)
|
||||
?~(lag ~ ?~(u.lag ~ [~ i.u.lag]))
|
||||
::
|
||||
cip
|
||||
~
|
||||
==
|
||||
::
|
||||
@ -226,7 +316,7 @@
|
||||
now
|
||||
[1 ~]
|
||||
==
|
||||
abet:work:(~(into ya [u.oar p.saw] sef q.saw) pul moh)
|
||||
abet:work:(~(into ya [our p.saw] sef q.saw) pul moh)
|
||||
::
|
||||
++ muff :: return card
|
||||
|= fav=card
|
||||
|
@ -1858,7 +1858,7 @@
|
||||
:: [%thee p=@ud q=scab r=cred s=moth] :: cooked htreq
|
||||
[%them p=(unit hiss)] :: internal client req
|
||||
[%they p=@ud q=httr] :: response to %them
|
||||
[%this p=? q=@ud r=httq] :: secure/session/req
|
||||
[%this p=? q=clip r=httq] :: secure/src/req
|
||||
[%thou p=httr] :: raw http response
|
||||
[%thug p=@p q=@p] :: sign in client
|
||||
[%thus p=@ud q=(unit hiss)] :: http request/cancel
|
||||
@ -1906,11 +1906,12 @@
|
||||
kyq=(unit coal) :: app customization
|
||||
gam=(unit coal) :: app image
|
||||
== ::
|
||||
++ clip (each ,@if ,@is) :: client IP
|
||||
++ cred :: credential
|
||||
$: hut=hoot :: client host
|
||||
aut=(map ,@tas (list ,@t)) :: client identities
|
||||
orx=oryx :: CSRF secret
|
||||
acc=(unit ,[p=@t q=@t]) :: accept / language
|
||||
acl=(unit ,@t) :: accept-language
|
||||
cip=(each ,@if ,@is) :: client IP
|
||||
cum=(map ,@tas ,*) :: custom dirt
|
||||
== ::
|
||||
@ -2016,7 +2017,7 @@
|
||||
++ hist ,[p=@ud q=(list ,@t)] :: depth texts
|
||||
++ hole ,@t :: session identity
|
||||
++ hook path :: request origin
|
||||
++ hoot ,[p=? q=? r=host] :: secure/mapped/host
|
||||
++ hoot ,[p=? q=? r=(unit ,@ud) s=host] :: secure/mapped/host
|
||||
++ hart ,[p=? q=(unit ,@ud) r=host] :: http sec/port/host
|
||||
++ hort ,[p=(unit ,@ud) q=host] :: http port/host
|
||||
++ hose ,[p=(list tank) q=(unit vase) r=seam s=heir] :: http environment
|
||||
@ -2028,6 +2029,11 @@
|
||||
s=(unit octs) :: body
|
||||
== ::
|
||||
++ httr ,[p=@ud q=mess r=(unit octs)] :: raw http response
|
||||
++ httx :: encapsulated http
|
||||
$: p=? :: https?
|
||||
q=clip :: source IP
|
||||
r=httq ::
|
||||
== ::
|
||||
++ kite ,[p=care q=case r=ship s=disc t=spur] :: parsed global name
|
||||
++ json :: json top level
|
||||
$% [%a p=(list jval)] :: array
|
||||
|
@ -4,18 +4,19 @@
|
||||
^- manx
|
||||
:~ %html
|
||||
:~ %body
|
||||
~[%h3 +"{(scow %p own)} loves you for more than your body"]
|
||||
+"Hi, neighbor!{?:(=(~ quy) "" " You ask: {<quy>}")}?"
|
||||
~[%h3 +"{(scow %p own)} is generally a happy camper."]
|
||||
+"Hi, neighbor!{?:(=(~ quy) "" " You ask: {<quy>}?")}"
|
||||
%br
|
||||
+"You addressed the {?:(p.hut.ced "" "in")}secure, "
|
||||
+"{?:(q.hut.ced "" "un")}bound "
|
||||
+"{?:(-.r.hut.ced "DNS host {<p.r.hut.ced>}" "IPv4 host {<p.r.hut.ced>}")}."
|
||||
+"{?:(-.s.hut.ced "DNS host {<p.s.hut.ced>}" "IPv4 host {<p.s.hut.ced>}")}"
|
||||
?~(r.hut.ced +"" +" at port {<u.r.hut.ced>}.")
|
||||
%br
|
||||
+"Your CSRF token is '{<orx.ced>}'."
|
||||
%br
|
||||
?: ?=(~ acc.ced)
|
||||
+"You sent no accept headers."
|
||||
+"You accept {<p.u.acc.ced>}; language {<q.u.acc.ced>}."
|
||||
?: ?=(~ acl.ced)
|
||||
+"You sent no accept-language."
|
||||
+"Your language is {<u.acl.ced>}."
|
||||
%br
|
||||
?- -.cip.ced
|
||||
& +"You came from the IPv4 address {<p.cip.ced>}."
|
||||
@ -26,7 +27,7 @@
|
||||
+"You have no authenticated identities."
|
||||
+"Authenticated identities: {<aut.ced>}."
|
||||
%br
|
||||
+"This {<for>} page was produced in {<`path`pos>}, under {<suf>}"
|
||||
+"This {<for>} page was produced from {<`path`pos>}, under {<suf>}"
|
||||
+"{?:(=(~ but) "." ", in {<but>}.")}"
|
||||
==
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user