From 6c38e14510a6b2959b8714247d9cbf635f6aa152 Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Mon, 27 Feb 2023 16:35:06 -0300 Subject: [PATCH 1/8] refactor: solve invalid quotes params --- docker/php/config.php | 10 +++++----- docker/server/nginx.dockerfile | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docker/php/config.php b/docker/php/config.php index f90b765..2ebe995 100644 --- a/docker/php/config.php +++ b/docker/php/config.php @@ -1,10 +1,10 @@ "${CONFIG_GOOGLE_DOMAIN}", - "google_language" => "${CONFIG_GOOGLE_LANGUAGE}", + "google_domain" => ${CONFIG_GOOGLE_DOMAIN}, + "google_language" => ${CONFIG_GOOGLE_LANGUAGE}, "invidious_instance_for_video_results" => "${CONFIG_INVIDIOUS_INSTANCE}", - "wikipedia_language" => "${CONFIG_WIKIPEDIA_LANGUAGE}", + "wikipedia_language" => ${CONFIG_WIKIPEDIA_LANGUAGE}, "disable_bittorent_search" => ${CONFIG_DISABLE_BITTORRENT_SEARCH}, "bittorent_trackers" => "${CONFIG_BITTORRENT_TRACKERS}", @@ -21,8 +21,8 @@ "proxitok" => "${APP_PROXITOK}", // tiktok "wikiless" => "${APP_WIKILESS}", // wikipedia "quetre" => "${APP_QUETRE}", // quora - "libremdb" => "${APP_LIBREMDB}", // imdb, - "breezewiki" => "${APP_BREEZEWIKI}", // fandom, + "libremdb" => "${APP_LIBREMDB}", // imdb + "breezewiki" => "${APP_BREEZEWIKI}", // fandom "anonymousoverflow" => "${APP_ANONYMOUS_OVERFLOW}", // stackoverflow "curl_settings" => array( diff --git a/docker/server/nginx.dockerfile b/docker/server/nginx.dockerfile index 59c7a9f..66fe7ab 100644 --- a/docker/server/nginx.dockerfile +++ b/docker/server/nginx.dockerfile @@ -1,5 +1,9 @@ # Install Nginx with FastCGI enabled, optimizing its performance for serving content RUN apk add nginx +# Forward request and error logs to docker log collector +RUN ln -sf /dev/stdout /var/log/nginx/access.log &&\ + ln -sf /dev/stderr /var/log/nginx/error.log + # After executing the 'docker run' command, run the 'prepare.sh' script CMD [ "/bin/sh", "-c", "docker/server/prepare.sh" ] From 1bcd0ec35865300c980bd12ab6979e12ca5f9cb2 Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Tue, 7 Mar 2023 18:33:19 -0300 Subject: [PATCH 2/8] refactor: solve config errors of dockerfile and php configuration --- Dockerfile | 2 +- docker/attributes.sh | 17 ++--- docker/php/config.php | 120 ++++++++++++++++++++++++++------- docker/php/php.dockerfile | 9 +-- docker/php/prepare.sh | 2 +- docker/server/nginx.dockerfile | 4 +- 6 files changed, 115 insertions(+), 39 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0d5004..f0e7f30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax = edrevo/dockerfile-plus ARG VERSION="3.17" -FROM alpine:${VERSION} AS runner +FROM alpine:${VERSION} AS librex WORKDIR "/var/www/html" # Docker metadata contains information about the maintainer, such as the name, repository, and support email diff --git a/docker/attributes.sh b/docker/attributes.sh index 5a86ccc..c7acdd4 100755 --- a/docker/attributes.sh +++ b/docker/attributes.sh @@ -19,12 +19,13 @@ export OPEN_SEARCH_HOST=${OPEN_SEARCH_HOST:-"127.0.0.1"} # Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups # These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases -export CONFIG_GOOGLE_DOMAIN=${CONFIG_GOOGLE_DOMAIN:-"com"} -export CONFIG_GOOGLE_LANGUAGE=${CONFIG_GOOGLE_LANGUAGE:-"en"} -export CONFIG_INVIDIOUS_INSTANCE=${CONFIG_INVIDIOUS_INSTANCE:-"invidious.namazso.eu"} +export CONFIG_GOOGLE_DOMAIN="${CONFIG_GOOGLE_DOMAIN:-"com"}" +export CONFIG_GOOGLE_LANGUAGE_SITE="${CONFIG_GOOGLE_LANGUAGE_SITE:-"en"}" +export CONFIG_GOOGLE_LANGUAGE_RESULTS="${CONFIG_GOOGLE_LANGUAGE_RESULTS:-"en"}" +export CONFIG_INVIDIOUS_INSTANCE="${CONFIG_INVIDIOUS_INSTANCE:-"invidious.snopyta.org"}" export CONFIG_HIDDEN_SERVICE_SEARCH=${CONFIG_HIDDEN_SERVICE_SEARCH:-false} export CONFIG_DISABLE_BITTORRENT_SEARCH=${CONFIG_DISABLE_BITTORRENT_SEARCH:-false} -export CONFIG_BITTORRENT_TRACKERS=${CONFIG_BITTORRENT_TRACKERS:-"&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce"} +export CONFIG_BITTORRENT_TRACKERS="${CONFIG_BITTORRENT_TRACKERS:-"&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce"}" # The settings that will be used to handle Wikipedia results displayed on the libreX search page # the settings below can be edited via environment variables. @@ -52,12 +53,12 @@ export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""} export CURLOPT_PROXY_ENABLED=${CURLOPT_PROXY_ENABLED:-false} export CURLOPT_PROXY=${CURLOPT_PROXY:-""} export CURLOPT_RETURNTRANSFER=${CURLOPT_RETURNTRANSFER:-true} -export CURLOPT_ENCODING=${CURLOPT_ENCODING:-""} -export CURLOPT_USERAGENT=${CURLOPT_USERAGENT:-"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"} -export CURLOPT_CUSTOMREQUEST=${CURLOPT_CUSTOMREQUEST:-"GET"} +export CURLOPT_ENCODING=${CURLOPT_ENCODING:-"UTF-8"} +export CURLOPT_USERAGENT="${CURLOPT_USERAGENT:-"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"}" +export CURLOPT_CUSTOMREQUEST="${CURLOPT_CUSTOMREQUEST:-"GET"}" export CURLOPT_MAXREDIRS=${CURLOPT_MAXREDIRS:-5} export CURLOPT_TIMEOUT=${CURLOPT_TIMEOUT:-18} -export CURLOPT_VERBOSE=${CURLOPT_VERBOSE:-false} +export CURLOPT_VERBOSE=${CURLOPT_VERBOSE:-true} # These shell functions will be available for use by any function calls function AwkTrim() { awk '{$1=$1};1'; } diff --git a/docker/php/config.php b/docker/php/config.php index 2ebe995..57ce5f9 100644 --- a/docker/php/config.php +++ b/docker/php/config.php @@ -1,37 +1,112 @@ ${CONFIG_GOOGLE_DOMAIN}, - "google_language" => ${CONFIG_GOOGLE_LANGUAGE}, + "google_domain" => "${CONFIG_GOOGLE_DOMAIN}", + "google_language_site" => "${CONFIG_GOOGLE_LANGUAGE_SITE}", + "google_language_results" => "${CONFIG_GOOGLE_LANGUAGE_RESULTS}", + + "wikipedia_language" => "${CONFIG_WIKIPEDIA_LANGUAGE}", "invidious_instance_for_video_results" => "${CONFIG_INVIDIOUS_INSTANCE}", - "wikipedia_language" => ${CONFIG_WIKIPEDIA_LANGUAGE}, - - "disable_bittorent_search" => ${CONFIG_DISABLE_BITTORRENT_SEARCH}, + "disable_bittorent_search" => "${CONFIG_DISABLE_BITTORRENT_SEARCH}", "bittorent_trackers" => "${CONFIG_BITTORRENT_TRACKERS}", - "disable_hidden_service_search" => ${CONFIG_HIDDEN_SERVICE_SEARCH}, + "disable_hidden_service_search" => "${CONFIG_HIDDEN_SERVICE_SEARCH}", - "invidious" => "${APP_INVIDIOUS}", // youtube - "bibliogram" => "${APP_BIBLIOGRAM}", // instagram - "rimgo" => "${APP_RIMGO}", // imgur - "scribe" => "${APP_SCRIBE}", // medium - "librarian" => "${APP_LIBRARIAN}", // odysee - "gothub" => "${APP_GOTHUB}", // github - "nitter" => "${APP_NITTER}", // twitter - "libreddit" => "${APP_LIBREREDDIT}", // reddit - "proxitok" => "${APP_PROXITOK}", // tiktok - "wikiless" => "${APP_WIKILESS}", // wikipedia - "quetre" => "${APP_QUETRE}", // quora - "libremdb" => "${APP_LIBREMDB}", // imdb - "breezewiki" => "${APP_BREEZEWIKI}", // fandom - "anonymousoverflow" => "${APP_ANONYMOUS_OVERFLOW}", // stackoverflow + "frontends" => array( + "invidious" => array( + "instance_url" => "${APP_INVIDIOUS}", + "project_url" => "https://docs.invidious.io/instances/", + "original_name" => "YouTube", + "original_url" => "youtube.com" + ), + "bibliogram" => array( + "instance_url" => "${APP_BIBLIOGRAM}", + "project_url" => "https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md", + "original_name" => "Instagram", + "original_url" => "instagram.com" + ), + "rimgo" => array( + "instance_url" => "${APP_RIMGO}", + "project_url" => "https://codeberg.org/video-prize-ranch/rimgo#instances", + "original_name" => "Imgur", + "original_url" => "imgur.com" + ), + "scribe" => array( + "instance_url" => "${APP_SCRIBE}", + "project_url" => "https://git.sr.ht/~edwardloveall/scribe/tree/main/docs/instances.md", + "original_name" => "Medium", + "original_url" => "medium.com" + ), + "gothub" => array( + "instance_url" => "${APP_GOTHUB}", + "project_url" => "https://codeberg.org/gothub/gothub/wiki/Instances", + "original_name" => "GitHub", + "original_url" => "github.com" + ), + "librarian" => array( + "instance_url" => "${APP_LIBRARIAN}", + "project_url" => "https://codeberg.org/librarian/librarian#clearnet", + "original_name" => "Odysee", + "original_url" => "odysee.com" + ), + + "nitter" => array( + "instance_url" => "${APP_NITTER}", + "project_url" => "https://github.com/zedeus/nitter/wiki/Instances", + "original_name" => "Twitter", + "original_url" => "twitter.com" + ), + + "libreddit" => array( + "instance_url" => "${APP_LIBREREDDIT}", + "project_url" => "https://github.com/spikecodes/libreddit", + "original_name" => "Reddit", + "original_url" => "reddit.com" + ), + "proxitok" => array( + "instance_url" => "${APP_PROXITOK}", + "project_url" => "https://github.com/pablouser1/ProxiTok/wiki/Public-instances", + "original_name" => "TikTok", + "original_url" => "tiktok.com" + ), + "wikiless" => array( + "instance_url" => "${APP_WIKILESS}", + "project_url" => "https://github.com/Metastem/wikiless#instances", + "original_name" => "Wikipedia", + "original_url" => "wikipedia.com" + ), + "quetre" => array( + "instance_url" => "${APP_QUETRE}", + "project_url" => "https://github.com/zyachel/quetre", + "original_name" => "Quora", + "original_url" => "quora.com" + ), + "libremdb" => array( + "instance_url" => "${APP_LIBREMDB}", + "project_url" => "https://github.com/zyachel/libremdb", + "original_name" => "IMDb", + "original_url" => "imdb.com" + ), + "breezewiki" => array( + "instance_url" => "${APP_BREEZEWIKI}", + "project_url" => "https://gitdab.com/cadence/breezewiki", + "original_name" => "Fandom", + "original_url" => "fandom.com" + ), + "anonymousoverflow" => array( + "instance_url" => "${APP_ANONYMOUS_OVERFLOW}", + "project_url" => "https://github.com/httpjamesm/AnonymousOverflow#clearnet-instances", + "original_name" => "StackOverflow", + "original_url" => "stackoverflow.com" + ) + ), "curl_settings" => array( - CURLOPT_PROXY => "", + CURLOPT_PROXY => "${CURLOPT_PROXY}", CURLOPT_PROXYTYPE => CURLPROXY_HTTP, CURLOPT_RETURNTRANSFER => ${CURLOPT_RETURNTRANSFER}, CURLOPT_ENCODING => "${CURLOPT_ENCODING}", CURLOPT_USERAGENT => "${CURLOPT_USERAGENT}", - CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, + CURLOPT_IPRESOLVE => CURL_IPRESOLVE_WHATEVER, CURLOPT_CUSTOMREQUEST => "${CURLOPT_CUSTOMREQUEST}", CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP, CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP, @@ -39,6 +114,5 @@ CURLOPT_TIMEOUT => ${CURLOPT_TIMEOUT}, CURLOPT_VERBOSE => ${CURLOPT_VERBOSE} ) - ); ?> diff --git a/docker/php/php.dockerfile b/docker/php/php.dockerfile index 403918a..4c53e50 100644 --- a/docker/php/php.dockerfile +++ b/docker/php/php.dockerfile @@ -12,8 +12,9 @@ ENV OPEN_SEARCH_HOST="http://127.0.0.1:${NGINX_PORT}" # Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups # These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases ENV CONFIG_GOOGLE_DOMAIN="com" -ENV CONFIG_GOOGLE_LANGUAGE="en" -ENV CONFIG_INVIDIOUS_INSTANCE="https://invidious.namazso.eu" +ENV CONFIG_GOOGLE_LANGUAGE_SITE="en" +ENV CONFIG_GOOGLE_LANGUAGE_RESULTS="en" +ENV CONFIG_INVIDIOUS_INSTANCE="https://invidious.snopyta.org" ENV CONFIG_HIDDEN_SERVICE_SEARCH=false ENV CONFIG_DISABLE_BITTORRENT_SEARCH=false ENV CONFIG_BITTORRENT_TRACKERS="&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce" @@ -40,12 +41,12 @@ ENV APP_ANONYMOUS_OVERFLOW="" ENV CURLOPT_PROXY_ENABLED=false ENV CURLOPT_PROXY="" ENV CURLOPT_RETURNTRANSFER=true -ENV CURLOPT_ENCODING="" +ENV CURLOPT_ENCODING="UTF-8" ENV CURLOPT_USERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" ENV CURLOPT_CUSTOMREQUEST="GET" ENV CURLOPT_MAXREDIRS=5 ENV CURLOPT_TIMEOUT=18 -ENV CURLOPT_VERBOSE=false +ENV CURLOPT_VERBOSE=true # Install PHP-FPM using Alpine's package manager, apk # Configure PHP-FPM to listen on a Unix socket instead of a TCP port, which is more secure and efficient diff --git a/docker/php/prepare.sh b/docker/php/prepare.sh index bd4c77d..7a15b32 100755 --- a/docker/php/prepare.sh +++ b/docker/php/prepare.sh @@ -10,7 +10,7 @@ source "docker/attributes.sh" if [ ! -d "/run/php7" ] || [ ! -S "/run/php7/php-fpm7.sock" ]; then mkdir "/run/php7" touch "/run/php7/php-fpm7.sock" - chmod 0660 "/run/php7/php-fpm7.sock" + chmod 660 "/run/php7/php-fpm7.sock" chown nginx:nginx "/run/php7/php-fpm7.sock" fi diff --git a/docker/server/nginx.dockerfile b/docker/server/nginx.dockerfile index 66fe7ab..4f50131 100644 --- a/docker/server/nginx.dockerfile +++ b/docker/server/nginx.dockerfile @@ -2,8 +2,8 @@ RUN apk add nginx # Forward request and error logs to docker log collector -RUN ln -sf /dev/stdout /var/log/nginx/access.log &&\ - ln -sf /dev/stderr /var/log/nginx/error.log +# RUN ln -sf /dev/stdout /var/log/nginx/access.log &&\ +# ln -sf /dev/stderr /var/log/nginx/error.log # After executing the 'docker run' command, run the 'prepare.sh' script CMD [ "/bin/sh", "-c", "docker/server/prepare.sh" ] From a25893b53dce966276a726502e2d89fdb4136d48 Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Tue, 7 Mar 2023 18:34:03 -0300 Subject: [PATCH 3/8] feat: add 'docker-compose.yml' template for easy-to-use --- docker-compose.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5ce8593 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "2.1" +services: + librex: + image: librex:latest + container_name: librex + network_mode: bridge + ports: + - 8080:8080 + environment: + - PUID=1000 + - PGID=1000 + - VERSION=docker + - TZ=America/New_York + - CONFIG_GOOGLE_DOMAIN=com + - CONFIG_GOOGLE_LANGUAGE_SITE=en + - CONFIG_GOOGLE_LANGUAGE_RESULTS=en + - CONFIG_WIKIPEDIA_LANGUAGE=en + volumes: + - ./nginx_logs:/var/log/nginx + - ./php_logs:/var/log/php7 + restart: unless-stopped From 0ef03edcb158b475b8916268dbb091c8e26a2336 Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Tue, 7 Mar 2023 18:35:16 -0300 Subject: [PATCH 4/8] refactor: solve error request due to invalid request protocol --- .gitignore | 1 + config.php.example | 8 ++++---- engines/invidious/video.php | 4 +--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 4d4ce91..34fd4a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/.vscode /config.php /opensearch.xml diff --git a/config.php.example b/config.php.example index 52a526d..30af4b3 100644 --- a/config.php.example +++ b/config.php.example @@ -12,10 +12,10 @@ "wikipedia_language" => "en", // You can use any Invidious instance here - "invidious_instance_for_video_results" => "https://invidious.namazso.eu", + "invidious_instance_for_video_results" => "https://invidious.snopyta.org", "disable_bittorent_search" => false, - "bittorent_trackers" => "&tr=http%3A%2F%2Fnyaa.tracker.wf%3A7777%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce", + "bittorent_trackers" => "&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce", "disable_hidden_service_search" => false, @@ -130,9 +130,9 @@ // CURLOPT_PROXY => "ip:port", // CURLOPT_PROXYTYPE => CURLPROXY_HTTP, CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => "", + CURLOPT_ENCODING => "UTF-8", CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36", - CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, + CURLOPT_IPRESOLVE => CURL_IPRESOLVE_WHATEVER, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP, CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS | CURLPROTO_HTTP, diff --git a/engines/invidious/video.php b/engines/invidious/video.php index 1992194..1d7076b 100644 --- a/engines/invidious/video.php +++ b/engines/invidious/video.php @@ -2,13 +2,11 @@ function get_video_results($query) { global $config; - $instance_url = $config->invidious_instance_for_video_results; - + $url = "$instance_url/api/v1/search?q=$query"; $response = request($url); $json_response = json_decode($response, true); - $results = array(); foreach ($json_response as $response) From 395f3640e50ef1736c13fb2b5b95fed9db690651 Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Wed, 8 Mar 2023 18:46:23 -0300 Subject: [PATCH 5/8] refactor: solve torrent and tor search errors --- docker/php/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/php/config.php b/docker/php/config.php index 57ce5f9..a588745 100644 --- a/docker/php/config.php +++ b/docker/php/config.php @@ -7,9 +7,9 @@ "wikipedia_language" => "${CONFIG_WIKIPEDIA_LANGUAGE}", "invidious_instance_for_video_results" => "${CONFIG_INVIDIOUS_INSTANCE}", - "disable_bittorent_search" => "${CONFIG_DISABLE_BITTORRENT_SEARCH}", + "disable_bittorent_search" => ${CONFIG_DISABLE_BITTORRENT_SEARCH}, "bittorent_trackers" => "${CONFIG_BITTORRENT_TRACKERS}", - "disable_hidden_service_search" => "${CONFIG_HIDDEN_SERVICE_SEARCH}", + "disable_hidden_service_search" => ${CONFIG_HIDDEN_SERVICE_SEARCH}, "frontends" => array( "invidious" => array( From b29d7e0d91e6eb653d91d80a31a622edf9eacdc9 Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Mon, 13 Mar 2023 18:44:03 -0300 Subject: [PATCH 6/8] refactor: keep vscode debug configuration --- .gitignore | 1 - .vscode/launch.json | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index 34fd4a3..4d4ce91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -/.vscode /config.php /opensearch.xml diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6850cac --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Server", + "type": "php", + "request": "launch", + "runtimeArgs": [ + "-dxdebug.mode=debug", + "-dxdebug.start_with_request=yes", + "-S", + "localhost:0" + ], + "program": "", + "cwd": "${workspaceRoot}", + "port": 9003, + "serverReadyAction": { + "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", + "uriFormat": "http://localhost:%s", + "action": "openExternally" + } + } + ] +} From ed06bb7080456c95ae79a164f1729031db7591fe Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Mon, 13 Mar 2023 18:44:20 -0300 Subject: [PATCH 7/8] refactor: remove invalid value of CURLOPT_ENCODING option --- config.php.example | 2 +- docker/attributes.sh | 2 +- docker/php/php.dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.php.example b/config.php.example index 30af4b3..3d69fd6 100644 --- a/config.php.example +++ b/config.php.example @@ -130,7 +130,7 @@ // CURLOPT_PROXY => "ip:port", // CURLOPT_PROXYTYPE => CURLPROXY_HTTP, CURLOPT_RETURNTRANSFER => true, - CURLOPT_ENCODING => "UTF-8", + CURLOPT_ENCODING => "", CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36", CURLOPT_IPRESOLVE => CURL_IPRESOLVE_WHATEVER, CURLOPT_CUSTOMREQUEST => "GET", diff --git a/docker/attributes.sh b/docker/attributes.sh index c7acdd4..664b2ce 100755 --- a/docker/attributes.sh +++ b/docker/attributes.sh @@ -53,7 +53,7 @@ export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""} export CURLOPT_PROXY_ENABLED=${CURLOPT_PROXY_ENABLED:-false} export CURLOPT_PROXY=${CURLOPT_PROXY:-""} export CURLOPT_RETURNTRANSFER=${CURLOPT_RETURNTRANSFER:-true} -export CURLOPT_ENCODING=${CURLOPT_ENCODING:-"UTF-8"} +export CURLOPT_ENCODING=${CURLOPT_ENCODING:-""} export CURLOPT_USERAGENT="${CURLOPT_USERAGENT:-"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"}" export CURLOPT_CUSTOMREQUEST="${CURLOPT_CUSTOMREQUEST:-"GET"}" export CURLOPT_MAXREDIRS=${CURLOPT_MAXREDIRS:-5} diff --git a/docker/php/php.dockerfile b/docker/php/php.dockerfile index 4c53e50..b1b7b82 100644 --- a/docker/php/php.dockerfile +++ b/docker/php/php.dockerfile @@ -41,7 +41,7 @@ ENV APP_ANONYMOUS_OVERFLOW="" ENV CURLOPT_PROXY_ENABLED=false ENV CURLOPT_PROXY="" ENV CURLOPT_RETURNTRANSFER=true -ENV CURLOPT_ENCODING="UTF-8" +ENV CURLOPT_ENCODING="" ENV CURLOPT_USERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" ENV CURLOPT_CUSTOMREQUEST="GET" ENV CURLOPT_MAXREDIRS=5 From 07ad6732cf8f0c2437c03cc70c140e126b4e1936 Mon Sep 17 00:00:00 2001 From: "Junior L. Botelho (JLB)" Date: Mon, 13 Mar 2023 20:21:12 -0300 Subject: [PATCH 8/8] refactor: remove .vscode debug folder --- .vscode/launch.json | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 6850cac..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - "version": "0.2.0", - "configurations": [ - { - "name": "Debug Server", - "type": "php", - "request": "launch", - "runtimeArgs": [ - "-dxdebug.mode=debug", - "-dxdebug.start_with_request=yes", - "-S", - "localhost:0" - ], - "program": "", - "cwd": "${workspaceRoot}", - "port": 9003, - "serverReadyAction": { - "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", - "uriFormat": "http://localhost:%s", - "action": "openExternally" - } - } - ] -}