From c5027ba581fc8c3100c1e8da603defc7b99323b1 Mon Sep 17 00:00:00 2001 From: Olivier Date: Fri, 13 Oct 2023 19:37:57 +0200 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"conf/piped"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/piped/api.conf | 25 ++++++++++++++++++++++++ conf/piped/backend.conf | 42 ++++++++++++++++++++++++++++++++++++++++ conf/piped/frontend.conf | 22 +++++++++++++++++++++ conf/piped/proxy.conf | 26 +++++++++++++++++++++++++ 4 files changed, 115 insertions(+) create mode 100644 conf/piped/api.conf create mode 100644 conf/piped/backend.conf create mode 100644 conf/piped/frontend.conf create mode 100644 conf/piped/proxy.conf diff --git a/conf/piped/api.conf b/conf/piped/api.conf new file mode 100644 index 0000000..098a124 --- /dev/null +++ b/conf/piped/api.conf @@ -0,0 +1,25 @@ +# 2023-10-13 + +proxy_cache_path /tmp/pipedapi_cache levels=1:2 keys_zone=pipedapi:4m max_size=2g inactive=60m use_temp_path=off; + +server { + listen 80; + + server_name pipedapi.domain.com; + set $backend "http://xxx.xxx.xxx.xxx:8301"; + + aio threads=default; + + location ~* \.(jpg|jpeg|png|gif|ico)$ { + expires 30d; + add_header Cache-Control "public, no-transform"; + } + + location / { + aio threads=default; + proxy_cache pipedapi; + proxy_pass $backend; + proxy_http_version 1.1; + proxy_set_header Connection "keep-alive"; + } +} diff --git a/conf/piped/backend.conf b/conf/piped/backend.conf new file mode 100644 index 0000000..a82b1e5 --- /dev/null +++ b/conf/piped/backend.conf @@ -0,0 +1,42 @@ +# 2023-10-13 + +# The port to Listen on. +PORT:8080 + +# The number of workers to use for the server +HTTP_WORKERS:8 + +# Proxy +PROXY_PART:https://pipedproxy.domain.com + +# Outgoing HTTP Proxy - eg: 127.0.0.1: 8118 +#HTTP_PROXY: 127.0.0.1: 8118 + +# Captcha Parameters +#CAPTCHA_BASE_URL: https: //api.capmonster.cloud/ +#CAPTCHA_API_KEY: INSERT_HERE + +# Public API URL +API_URL: https://pipedapi.domain.com + +# Public Frontend URL +FRONTEND_URL: https://piped.domain.com + +# Enable haveibeenpwned compromised password API +COMPROMISED_PASSWORD_CHECK:true + +# Disable Registration +DISABLE_REGISTRATION:false + +# Feed Retention Time in Days +FEED_RETENTION:30 + +# Sentry DSN +#SENTRY_DSN:"" + +# Hibernate properties +hibernate.connection.url:jdbc:postgresql://xxx.xxx.xxx.xxx:8300/piped +hibernate.connection.driver_class:org.postgresql.Driver +hibernate.dialect:org.hibernate.dialect.PostgreSQLDialect +hibernate.connection.username:root +hibernate.connection.password:xxx diff --git a/conf/piped/frontend.conf b/conf/piped/frontend.conf new file mode 100644 index 0000000..3854646 --- /dev/null +++ b/conf/piped/frontend.conf @@ -0,0 +1,22 @@ +# 2023-10-13 + +server { + listen 80; + + server_name piped.domain.com; + set $backend "http://xxx.xxx.xxx.xxx:8302"; + + aio threads=default; + + location ~* \.(jpg|jpeg|png|gif|ico)$ { + expires 30d; + add_header Cache-Control "public, no-transform"; + } + + location / { + aio threads=default; + proxy_pass $backend; + proxy_http_version 1.1; + proxy_set_header Connection "keep-alive"; + } +} diff --git a/conf/piped/proxy.conf b/conf/piped/proxy.conf new file mode 100644 index 0000000..d09f1a1 --- /dev/null +++ b/conf/piped/proxy.conf @@ -0,0 +1,26 @@ +# 2023-10-13 + +server { + listen 80; + + server_name pipedproxy.domain.com; + + aio threads=default; + + location ~* \.(jpg|jpeg|png|gif|ico)$ { + expires 30d; + add_header Cache-Control "public, no-transform"; + } + + location ~ (/videoplayback|/api/v4/|/api/manifest/) { + aio threads=default; + include snippets/ytproxy.conf; + add_header Cache-Control private always; + } + + location / { + aio threads=default; + include snippets/ytproxy.conf; + add_header Cache-Control "public, max-age=604800"; + } +}