Compare commits
48 Commits
acfa066ed1
...
master
Author | SHA1 | Date | |
---|---|---|---|
426afc4f79 | |||
84470571d8 | |||
aee17c11e3 | |||
34affedd0b | |||
033ee5c253 | |||
34131debb5 | |||
4c641ef08d | |||
58ff080106 | |||
047f6943a3 | |||
d66f822573 | |||
e5b5f10225 | |||
14d2955153 | |||
3f2eceb101 | |||
97c4af2318 | |||
39afa5b8dd | |||
f2f6027e43 | |||
018dc3742c | |||
8958017294 | |||
26bb61b449 | |||
6321e97af2 | |||
e3926aa2ea | |||
030bf31bca | |||
47c1780ebb | |||
5e4f85a2c5 | |||
cd00151fbd | |||
e12a37546b | |||
18266d5499 | |||
d10b3caf42 | |||
bd51c6316d | |||
423585bc9a | |||
be8294a8b2 | |||
af1e86b7d1 | |||
f13cd0ba64 | |||
36351cba70 | |||
9989c740cd | |||
aaef37882b | |||
8e4eedc8b3 | |||
0d76a6423c | |||
f4a278fae7 | |||
d265cc7253 | |||
5ec08910ce | |||
adb34de0e9 | |||
8c7ae01163 | |||
c5ebe8bd14 | |||
509e4fccbd | |||
317fb36149 | |||
b9051ddd9f | |||
ede09f7e45 |
29
Caddyfile
29
Caddyfile
@ -1,38 +1,21 @@
|
||||
# vim: ft=caddyfile
|
||||
{
|
||||
grace_period 30s
|
||||
import email
|
||||
import email
|
||||
}
|
||||
|
||||
(basicerrors) {
|
||||
# servers :443 {
|
||||
# protocol {
|
||||
# experimental_http3
|
||||
# }
|
||||
# }
|
||||
#}
|
||||
|
||||
(basicerrors) {
|
||||
handle_errors {
|
||||
templates
|
||||
|
||||
rewrite * /{http.error.status_code}.jpg
|
||||
root * /var/www/errors
|
||||
file_server
|
||||
rewrite * /index.html
|
||||
root * /etc/caddy/errors
|
||||
file_server
|
||||
}
|
||||
}
|
||||
|
||||
(hsts) {
|
||||
handle_path /.well-known/matrix/* {
|
||||
header Access-Control-Allow-Origin "*"
|
||||
header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||
|
||||
rewrite * {path}.json
|
||||
root * /etc/caddy/matrix_well_known
|
||||
file_server
|
||||
}
|
||||
}
|
||||
header Strict-Transport-Security max-age=31536000
|
||||
}
|
||||
|
||||
import conf.d/*
|
||||
import conf.d/*
|
||||
|
@ -1,16 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
www.boba.best {
|
||||
redir https://boba.best{uri}
|
||||
}
|
||||
boba.best {
|
||||
import matrix-well-known
|
||||
|
||||
header Access-Control-Allow-Origin *
|
||||
root * /var/www/boba.best/public
|
||||
file_server {
|
||||
precompressed br gzip
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
drone.boba.best {
|
||||
encode zstd gzip
|
||||
|
||||
reverse_proxy localhost:8081 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
emotes.boba.best {
|
||||
encode zstd gzip
|
||||
|
||||
root * /var/www/emotes.boba.best/public
|
||||
file_server {
|
||||
index index.json
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
flower.boba.best {
|
||||
encode zstd gzip
|
||||
|
||||
root * /var/www/flower.boba.best
|
||||
handle {
|
||||
rewrite * /flowerpet.gif
|
||||
file_server
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
furry.boba.best {
|
||||
encode zstd gzip
|
||||
|
||||
root * /var/www/furry.boba.best
|
||||
handle {
|
||||
rewrite * /alien_furry.gif
|
||||
file_server
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -2,11 +2,7 @@
|
||||
|
||||
git.boba.best {
|
||||
encode zstd gzip
|
||||
|
||||
handle_path /_/static/* {
|
||||
root * /var/www/git.boba.best/public
|
||||
file_server
|
||||
}
|
||||
import hsts
|
||||
|
||||
handle {
|
||||
reverse_proxy localhost:85 {
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
grafana.boba.best {
|
||||
encode zstd gzip
|
||||
import hsts
|
||||
|
||||
reverse_proxy localhost:84
|
||||
import basicerrors
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
mail.boba.best mail.bbaovanc.com autodiscover.boba.best autodiscover.bbaovanc.com autoconfig.boba.best autoconfig.bbaovanc.com {
|
||||
encode zstd gzip
|
||||
import hsts
|
||||
|
||||
reverse_proxy localhost:8082 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
|
@ -1,156 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
matrix.boba.best {
|
||||
encode zstd gzip
|
||||
|
||||
import matrix-well-known
|
||||
|
||||
|
||||
redir /admin /admin/
|
||||
handle_path /admin/* {
|
||||
file_server {
|
||||
root /var/www/synapse-admin/build
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@generic {
|
||||
# Sync requests
|
||||
path /_matrix/client/*/events
|
||||
|
||||
# Federation requests
|
||||
path /_matrix/federation/v1/event/*
|
||||
path /_matrix/federation/v1/state/*
|
||||
path /_matrix/federation/v1/state_ids/*
|
||||
path /_matrix/federation/v1/backfill/*
|
||||
path /_matrix/federation/v1/get_missing_events/*
|
||||
path /_matrix/federation/v1/publicRooms*
|
||||
path /_matrix/federation/v1/query/*
|
||||
path /_matrix/federation/v1/make_join/*
|
||||
path /_matrix/federation/v1/make_leave/*
|
||||
path /_matrix/federation/v1/send_join/*
|
||||
path /_matrix/federation/v2/send_join/*
|
||||
path /_matrix/federation/v1/send_leave/*
|
||||
path /_matrix/federation/v2/send_leave/*
|
||||
path /_matrix/federation/v1/invite/*
|
||||
path /_matrix/federation/v2/invite/*
|
||||
path /_matrix/federation/v1/query_auth/*
|
||||
path /_matrix/federation/v1/event_auth/*
|
||||
path /_matrix/federation/v1/exchange_third_party_invite/*
|
||||
path /_matrix/federation/v1/user/devices/*
|
||||
path /_matrix/federation/v1/get_groups_publicised
|
||||
path /_matrix/key/v2/query
|
||||
path /_matrix/key/v2/query/*
|
||||
|
||||
# Client API requests
|
||||
path /_matrix/client/*/createRoom
|
||||
path /_matrix/client/*/publicRooms
|
||||
path /_matrix/client/*/rooms/*/joined_members
|
||||
path /_matrix/client/*/rooms/*/context/*
|
||||
path /_matrix/client/*/rooms/*/members
|
||||
path /_matrix/client/*/rooms/*/state
|
||||
path /_matrix/client/*/account/3pid
|
||||
path /_matrix/client/*/devices
|
||||
path /_matrix/client/*/keys/query
|
||||
path /_matrix/client/*/keys/changes
|
||||
path /_matrix/client/versions
|
||||
path /_matrix/client/*/voip/turnServer
|
||||
path /_matrix/client/*/joined_groups
|
||||
path /_matrix/client/*/publicised_groups
|
||||
path /_matrix/client/*/publicised_groups/*
|
||||
path /_matrix/client/*/rooms/*/event/*
|
||||
path /_matrix/client/*/joined_rooms
|
||||
path /_matrix/client/*/search
|
||||
|
||||
# Registration/login requests
|
||||
path /_matrix/client/*/login
|
||||
path /_matrix/client/*/register
|
||||
|
||||
# Event sending requests
|
||||
path /_matrix/client/*/rooms/*/redact
|
||||
path /_matrix/client/*/rooms/*/send
|
||||
path /_matrix/client/*/rooms/*/state/*
|
||||
path_regexp /_matrix/client/*/rooms/*/(join|invite|leave|ban|unban|kick)$
|
||||
path /_matrix/client/*/join/*
|
||||
path /_matrix/client/*/profile/*
|
||||
|
||||
# Additionally, the following REST endpoints can be handled for GET requests:
|
||||
path /_matrix/federation/v1/groups/*
|
||||
}
|
||||
|
||||
@generic_iphash {
|
||||
path /_matrix/client/*/rooms/*/messages
|
||||
|
||||
# Sync requests (again)
|
||||
path /_matrix/client/*/sync
|
||||
path /_matrix/client/*/initialSync
|
||||
path /_matrix/client/*/rooms/*/initialSync
|
||||
|
||||
# Inbound federation transaction request
|
||||
path /_matrix/federation/v1/send/*
|
||||
}
|
||||
|
||||
@media {
|
||||
path /_matrix/media/*
|
||||
|
||||
path /_synapse/admin/v1/purge_media_cache
|
||||
path /_synapse/admin/v1/room/*/media*
|
||||
path /_synapse/admin/v1/user/*/media*
|
||||
path /_synapse/admin/v1/media/*
|
||||
path /_synapse/admin/v1/quarantine_media/*
|
||||
path /_synapse/admin/v1/users/*/media
|
||||
}
|
||||
|
||||
|
||||
handle @generic {
|
||||
reverse_proxy {
|
||||
to localhost:8010
|
||||
to localhost:8011
|
||||
to localhost:8012
|
||||
to localhost:8013
|
||||
lb_policy round_robin
|
||||
health_uri /health
|
||||
health_interval 15s
|
||||
health_timeout 5s
|
||||
}
|
||||
}
|
||||
handle @generic_iphash {
|
||||
reverse_proxy {
|
||||
to localhost:8010
|
||||
to localhost:8011
|
||||
to localhost:8012
|
||||
to localhost:8013
|
||||
lb_policy ip_hash
|
||||
health_uri /health
|
||||
health_interval 15s
|
||||
health_timeout 5s
|
||||
}
|
||||
}
|
||||
|
||||
handle @media {
|
||||
reverse_proxy {
|
||||
to localhost:8009
|
||||
health_uri /health
|
||||
health_interval 15s
|
||||
health_timeout 5s
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
handle /_matrix/* {
|
||||
reverse_proxy localhost:8008
|
||||
}
|
||||
handle /_synapse/client/* {
|
||||
reverse_proxy localhost:8008
|
||||
}
|
||||
handle /_synapse/admin/* {
|
||||
reverse_proxy localhost:8008
|
||||
}
|
||||
|
||||
|
||||
handle {
|
||||
redir https://boba.best/services/bobachat/
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
:2020 {
|
||||
metrics
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
peertube.boba.best {
|
||||
encode zstd gzip
|
||||
|
||||
reverse_proxy 127.0.0.1:9000 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
rick.boba.best {
|
||||
redir https://www.youtube.com/watch?v=dQw4w9WgXcQ temporary
|
||||
import basicerrors
|
||||
}
|
12
conf.d/share.boba.best
Normal file
12
conf.d/share.boba.best
Normal file
@ -0,0 +1,12 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
share.boba.best {
|
||||
encode zstd gzip
|
||||
import hsts
|
||||
|
||||
handle {
|
||||
reverse_proxy localhost:87
|
||||
}
|
||||
|
||||
import basicerrors
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
status.boba.best {
|
||||
status.boba.best, status.bbaovanc.com {
|
||||
encode zstd gzip
|
||||
import hsts
|
||||
|
||||
reverse_proxy localhost:83
|
||||
|
||||
reverse_proxy localhost:82 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
import basicerrors
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
# vim: ft=caddyfile
|
||||
|
||||
turn.boba.best {
|
||||
respond "where are you"
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
|
||||
vault.boba.best {
|
||||
encode zstd gzip
|
||||
import hsts
|
||||
|
||||
header {
|
||||
X-XSS-Protection "1; mode=block"
|
||||
|
29
errors/index.html
Normal file
29
errors/index.html
Normal file
@ -0,0 +1,29 @@
|
||||
{{ $code := placeholder "http.error.status_code" -}}
|
||||
{{ $text := placeholder "http.error.status_text" -}}
|
||||
{{ $full_text := printf "%s %s" (placeholder "http.error.status_code") (placeholder "http.error.status_text") -}}
|
||||
{{ $host := placeholder "http.request.host" -}}
|
||||
{{ $img_url := (printf "https://http.cat/%s.jpg" $code) -}}
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ $full_text }}</title>
|
||||
|
||||
<meta name="title" content="{{ $full_text }}" />
|
||||
<meta name="description" content="{{ $full_text }}" />
|
||||
|
||||
<meta property="og:title" content="{{ $full_text }}" />
|
||||
<meta property="og:description" content="{{ $full_text }}" />
|
||||
<meta property="og:image" content="{{ $img_url }}"/>
|
||||
<meta property="og:site_name" content="{{ $host }}" />
|
||||
|
||||
<meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:image" content="{{ $img_url }}"/>
|
||||
<meta name="twitter:title" content="{{ $full_text }}" />
|
||||
<meta name="twitter:description" content="{{ $full_text }}" />
|
||||
</head>
|
||||
<body bgcolor="black" text="white">
|
||||
<center>
|
||||
<h1>{{ $full_text }}</h1>
|
||||
<img src="{{ $img_url }}" alt="cat" />
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user