From 7d53ee43f82cc5eda12e7f585e785933b4aa18dc Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Tue, 19 Aug 2025 11:10:10 +0000 Subject: [PATCH] Ratifying Pure Functionality Of Nothing New --- .gitignore | 5 +- README | 60 +++++++++++++ git/.gitkeep | 0 gorillanest | 30 ++----- gorillanest.nginx | 22 +++++ gorillanest.sqlite3 | Bin 16384 -> 0 bytes git-construct.pl => perl/git-construct.pl | 0 static/style.css | 100 ++++++++++++++++++++++ 8 files changed, 192 insertions(+), 25 deletions(-) create mode 100644 README delete mode 100644 git/.gitkeep create mode 100644 gorillanest.nginx delete mode 100644 gorillanest.sqlite3 rename git-construct.pl => perl/git-construct.pl (100%) create mode 100644 static/style.css diff --git a/.gitignore b/.gitignore index f947323..0c4032e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -*.sqlite +*.sqlite3 git/* -!git/.gitkeep +!git/public/.gitkeep +!git/private/.gitkeep diff --git a/README b/README new file mode 100644 index 0000000..2998855 --- /dev/null +++ b/README @@ -0,0 +1,60 @@ + . * % @ - .@- @: : : @. + : . @. -. - ++ = %@ @: + . . *. -+%- -- @ .. += =@- =@- + ... : .:. * :: = =- .@+ @=. + :: .-:-:.:= - @* @@ -= @@+- == + ** :-. :--*+= . :+ +. **=- +:: + :.==..=+=-:-:.::=+=+ .. : : . . :+== = +- + .+@%+--: .. .:::. .. .*= =: + .=@+ .*== :==-::. ..-::: ..: . :: = + ..===-.:.+++- -+*+==::. . :: - =- + =. :+++==+@@%%@++-:-.... %= @- + .:-+*@@*@@*=---=+-.... . -+ =- + *+. - +:= -@@** =+=%%%@@@@@@+: -. =- + ::..+@ :=. :@%@@@@@@@@*=. =++--=@@*+-:=**@@*@*=---:::. @- - + @=:-:=@: +@=+- .--..-::-*@@@@@%*@@-. .=-:=+++**+-.=**%@@@@@@ @: @*: + *@*+==@+:*+-----@*- .:---=@@ :+@@@@@*@**@*@: :*%@@==-=%@@%: .: + = += +*@%%+.-@= = :+*+= @@@@@@% --. + :- :--:-::.:... + . *% :@*@%= :@%%. .. @ :**+++++*- @+ -@**@@@%@@= @+ .-----.:.:: +-----------------------+ + @%*-@@ -@@%+ :-. .. * .:-:-.. =@ @+-. :@@ %%%------=---- | | + =*=-+@. %* :. *@ . @@ :=++++: -*@. @:.::-:-:-:::: | | + :++:::@+ .. ...:.. ***_ @ - .. @- =-.---:::------______| WELCOME TO GORILLA | + *@@ .. .. .... -*@@@@- +@^^* @* NEST , | + *%@@+@@@.... ::...:... ..-:-+++ = :==**@@@+= ______, | + :-=@ =@ ..:........ ..:-=++**+-+@**++-. .=. *----:----====++== | | + --== : .. ....:::::::.:::-=+-:..-@@@@%%%%@@@+=:. +--===-------=++== +-----NIGGER------------+ + *@%. ...... . ..:::..:..:.. ...----==+*+ :-. @+--========-:-++=- + @ ...... .....:: . ::--=:--=+@@%@@+=- :-: ++= + +* . ....:--::. :++**=. . : :+*= -+- + @= .....:..:....:-. *%@%@@@@@@%@@++++*+++== .== + %@+ .-::::.. ....:::.=%%*+- -@@@@%@%@@@@%@%@+ :-== + @@@@ .-=-----. . ::--+**-.::. =@@@@@@@=+*%= :%@+ +-*%@@@* .:-:::::-:::.:-==**+=-..++- ==. :== I CAN BELIEVE +:. . ::...:::..::..:-=--:-:-*%@@%=---====+-:-- TOO YOU ++@@- -.:==::::::--... :. . .:=%%@@@@@@=-=--=+ SOFTWARE WORKS +--+@@@* . .=-++=------::: .: --=: -==-++ +=+++*%@@@= : *-++=====++++++@+==++-. .. . -=-: !T JUST WORKS ¡ +***+*+=+%@@@= :: @@@*+++++*@@*@%@@@@@**++++++--=-=- +++++**+++++@@@@% @@@*@@*+@****@@@@%%%%@%%@@@*%* +===+++********@@@@. . :+**@@@@@@@@@@@@@@@@@@@%@@@% +++++*+********++*%@@@ ..::=*+****@*%%%%%%%@@@@@= =@ +======++*@++**+****@@@@@ .:-==++====-++*+@%+- :=+ :++ +===+==+++*************@@@@@:.-===++++*****++:.: :@.+@** :++ ++++++=++=+=****+*+*****+@@@@@=::--====-----:.:: @:::**@* :++ +*****+++++=++++***@**@*****@@@@@%=-:::.:.. .:. @=-..*@***=:-% +**+****+++++*****+***********@*@@%@%@+ @+*=- -%++++--*@ ++++******++++++*+*+********@******@@%@@@@@- -@@+*+*+ -@*=++=-=% +*********+*****+*+**+**************++***%@@@@@@@@@+++++*:.*****+=*@ ((( HE COULDN'T GIT CLONE ALWAYS ))) +++admin@chud.cyou***+*********@*****@***+++**+*+**+++==**=:=+++*+=*%@ ((( NO HIM STOPPING NOW ))) +*****+*+*@@*+*******+@@*+********@****@++*++++++++*+**==*++-*+=+++=*%* +*+++****+@***++***+***+++********+++*+****++*+*+*+++++==+++++*@+++==@% + +* WKꓵΓꓕᖉⱯ ACTIVATION TRANMISSION RECIEVED: GO RI LL A_ NE ST * +* Copyright 2025-∞ People's Republic of Magyarország & Emil's Email Services * + + +Gitea broke so I had a low wage hungarian programmer write this. + +Everything runs from this directory via './gorillanest'. + +gorillanest will provide GIT & HTTP access for all repos in /public/ unconditionally, and /private/ for authorized connections. diff --git a/git/.gitkeep b/git/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/gorillanest b/gorillanest index 508f45f..9587ad8 100755 --- a/gorillanest +++ b/gorillanest @@ -10,7 +10,6 @@ use Syntax::Keyword::Try; use Sys::Syslog; use Template; use URI::Escape; -use DBI; sub info { syslog("info", join(' ', @_)); @@ -60,28 +59,12 @@ sub GN::cache { # cache{'/some/path'} openlog("gorillanest", "ndelay,pid", Sys::Syslog::LOG_DAEMON); try { - my $gitroot = 'git'; + my $public = 'git/public'; my $dbfile = 'gorillanest.sqlite3'; my %data; # useful for minimizing passing and for templating, put default configuration details meant to go on the page in this thing note that it's rw # my $request = FCGI::Request(); my $template = Template->new({INCLUDE_PATH => 'template'}); - my $db = DBI->connect("dbi:SQLite:dbname=$dbfile","","", { - RaiseError => 1, - AutoCommit => 1, - sqlite_see_if_its_a_number => 1, - }) or die $DBI::errstr; - # $db->do( - # "CREATE TABLE IF NOT EXISTS users ( - # id INTEGER PRIMARY KEY AUTOINCREMENT, - # name TEXT NOT NULL CHECK(length(name) <= 32), - # pass TEXT NOT NULL CHECK(length(pass) <= 128 - # AND length(pass) >= 32), - # UNIQUE(name))"); - # my $sth = $db->prepare("INSERT INTO users (name, pass) VALUES (?, ?)"); - # $sth->execute("test", "PUM6w22pxoGVB03qlgEUVBumYgPL2RTGqegoz8vZf7jpsqRQahC3d2OXOH3qFnvo"); - # $db->disconnect; - # my $head = 0; my $a_template; while($request->Accept() >= 0) { @@ -95,18 +78,19 @@ try { if ($method eq 'HEAD') { $head = 1; } elsif ($method eq 'GET') { - ($data{name}, $data{repository}) = $uri =~ m{/(.*?)/(?:(.*))?}; + ($data{name}, $data{repository}) = $uri =~ m{/([a-z]*)/(?:([a-z]*(?:.git)?))?}; # info("name:", $data{name} || '', "repo:", $data{repository} || ''); if ($uri eq '/') { - $data{directories} = GN::index($gitroot, \%data); + $data{directories} = GN::index($public, \%data); $a_template = "index.tt"; } elsif ($data{repository}) { - $data{directories} = GN::repositories($gitroot, \%data); + $data{directories} = GN::repositories($public, \%data); $a_template = "repository.tt"; } elsif ($data{name}) { - $data{directories} = GN::user($gitroot, \%data); + $data{directories} = GN::user($public, \%data); $a_template = "index_user.tt"; - } else { + } + if (!$data{directories}) { $header{-status} = '404 Not Found'; $a_template = "404.tt"; } diff --git a/gorillanest.nginx b/gorillanest.nginx new file mode 100644 index 0000000..67156c7 --- /dev/null +++ b/gorillanest.nginx @@ -0,0 +1,22 @@ +server { + server_name gorillanest.example.com; + add_header Content-Security-Policy "default-src 'self';" always; + root /var/www/gorillanest; + + location = /gorillanest { + add_header Cache-Control "max-age=0; must-revalidate; no-cache"; + include fastcgi_params; + fastcgi_pass unix:/run/fcgiwrap.socket; + } + + location ~ \.(jpg|png|avif|css)$ { + root /var/www/gorillanest/static; + } + + rewrite ^/ /gorillanest; +} + +# Notice: AIDS +# I changed the deployment copy in some critical areas +# will update this file when things are more ratified server-side, and remove this notice +# P.S. You VILL constantly backport gorillians of minor improvement tweaks diff --git a/gorillanest.sqlite3 b/gorillanest.sqlite3 deleted file mode 100644 index 2f8a9e479d18a948a2006e0104c6d0f264b1f3ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI(&u-c<90zclbp0n$cByjpk*L))5^3vUof@c1qlN^sq$<0hY`ByO64HdW>TOeB zqz|#j*y~g~&IITN(stgu?@uwtiGSGs$d@GIUCZugf}O{g!!Tn8c}^%L2aFLy3bL%o zG7l=hEVt*^epeUBi`%4F`c9NBmu%gazR3y!0SG_<0uX=z1Rwwb2tWV=|Gq#|Sygv- zXgdo(3`Cj?4hXm6_TXjjpMxO7AN9Z;n%O zndTpbh5Y;!D{rz{^t;S*d|u}sYkF40^xEu%x0xCEuI0$g26z13$KI3Cn9t9A=D4y1 zw#{nCymnF^h^Uuc!;P1Ml$H};Iuj(wtG!m z_xySydhzYv)%)|;pGIlowZe;<(be5E_t;2|qN{jQu8Yd|^YTDI00Izz00bZa0SG_< z0uX=z1R(Il1lE-8jmh(a>HGf&QhIn|3&e6D009U<00Izz00bZa0SG_<0{^|hI#tw- I{Eq-X0NQV$)c^nh diff --git a/git-construct.pl b/perl/git-construct.pl similarity index 100% rename from git-construct.pl rename to perl/git-construct.pl diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..830e43a --- /dev/null +++ b/static/style.css @@ -0,0 +1,100 @@ +body { +margin: auto; +width: 50%; +} +h1, h2, h3 { +padding-left: 3em; +} +h4 { +padding-left: 1em; +} +p { +padding-left: 1em; +} +pre { +font-weight: bold; +} +a { +text-decoration: none; +} +a:active { +color: green; +} +code { +white-space: pre-wrap; +font-size: 0.7em; +padding: 1em; +} +#title { +padding: 0.5em; +font-size: 3em; +} + +/* stolen from darkreader static */ +html, +body, +:not([style*="background-color:"]):not(iframe) { + background-color: black !important; +} +html, +body, +:not([style*="color:"]), +.sr-reader *:not([class*='sr-pivot']) { + color: rgb(225, 253, 203) !important; +} +h1:not([style*="color:"]), +h2:not([style*="color:"]), +h3:not([style*="color:"]), +h4:not([style*="color:"]), +h5:not([style*="color:"]), +h6:not([style*="color:"]) { + color: rgb(247, 2, 56) !important; +} +cite:not([style*="color:"]) { + color: rgb(30, 214, 88) !important; +} +input:not([style*="background-color:"]), +textarea:not([style*="background-color:"]), +button:not([style*="background-color:"]), +[role="button"] { + background-color: rgb(32, 48, 64) !important; +} +input:not([style*="background-color:"]):hover, +textarea:not([style*="background-color:"]):hover, +button:not([style*="background-color:"]):hover, +[role="button"]:hover { + background-color: rgb(30, 54, 78) !important; +} +input:not([style*="background-color:"]):active, input:not([style*="background-color:"]):focus, +textarea:not([style*="background-color:"]):active, textarea:not([style*="background-color:"]):focus, +button:not([style*="background-color:"]):active, button:not([style*="background-color:"]):focus, +[role="button"]:active, [role="button"]:focus { + background-color: rgb(29, 56, 83) !important; +} +a:not([style*="color:"]) { + color: rgb(128, 182, 204) !important; +} +a:not([style*="color:"]):hover { + color: rgb(142, 193, 217) !important; +} +a:not([style*="color:"]):active, a:not([style*="color:"]):focus { + color: rgb(155, 203, 230) !important; +} +:not([style*="border-color:"]), +::before, +::after { + border-color: rgb(80, 115, 134) !important; +} +div:empty, +.sr-reader *, +.sr-backdrop { + background-color: rgba(16, 20, 23, 0.5) !important; +} +input::placeholder, +textarea::placeholder { + color: rgba(167, 158, 139, 0.5) !important; +} +input:not([style*="background-image:"]), +textarea:not([style*="background-image:"]) { + background-image: none !important; +} -- 2.39.5