Compare commits

..

10 commits

Author SHA1 Message Date
D. Scott Boggs 853b74d759 Merge updates from master, 2023-09-01 2023-09-01 08:38:40 -04:00
Pablo Ferreiro 9d9207b05e
shut down signer (way) faster 2023-07-26 22:21:06 +02:00
Pablo Ferreiro 923d42c6c1
auto yes 2023-07-26 21:56:42 +02:00
Pablo Ferreiro 5ba084dae1
bump cosign and pin php-nginx version 2023-07-26 21:51:32 +02:00
Pablo Ferreiro 4f906ef801
new docker image 2023-07-26 21:41:37 +02:00
Pablo Ferreiro 15fdd41cad
small changes to UI 2023-07-04 16:39:53 +02:00
Pablo Ferreiro 34623c8e43
hotfix 2023-06-12 18:57:05 +02:00
Pablo Ferreiro 629da5f357
Fixed more crashing issues 2023-06-12 15:20:51 +02:00
Pablo Ferreiro 4a59dab75c
Docker updated to PHP8.2 2023-06-12 15:20:42 +02:00
Pablo Ferreiro 8c769d89d4
Fixed isAd crash 2023-06-12 15:08:02 +02:00
10 changed files with 67 additions and 73 deletions

View file

@ -1,9 +1,6 @@
node_modules node_modules
/.env .env
/.git .git
/.vscode .vscode
/vendor vendor
/cache/latte/* cache
!/cache/latte/.gitkeep
/cache/api/*
!/cache/api/.gitkeep

View file

@ -42,9 +42,9 @@ jobs:
# https://github.com/sigstore/cosign-installer # https://github.com/sigstore/cosign-installer
- name: Install cosign - name: Install cosign
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@main uses: sigstore/cosign-installer@v3.1.1
with: with:
cosign-release: 'v2.0.0-rc.0' cosign-release: 'v2.1.1'
# Workaround: https://github.com/docker/build-push-action/issues/461 # Workaround: https://github.com/docker/build-push-action/issues/461
@ -96,7 +96,6 @@ jobs:
- name: Sign the published Docker image - name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
env: env:
COSIGN_EXPERIMENTAL: "true" DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate TAGS: ${{ steps.meta.outputs.tags }}
# against the sigstore community Fulcio instance. run: cosign sign --yes "${TAGS}@${DIGEST}"
run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}

View file

@ -1,25 +1,22 @@
FROM php:8.1-apache FROM trafex/php-nginx:3.1.0
WORKDIR /var/www/html
# Add composer
COPY --from=composer /usr/bin/composer /usr/bin/composer COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN apt update -y && apt upgrade -y \
&& apt install -y --no-install-recommends libzip-dev \
&& pecl install redis zip \
&& docker-php-ext-enable redis zip \
&& a2enmod rewrite headers \
&& mkdir /cache \
&& chown -R www-data:www-data /cache \
&& rm -rf /var/www/html/*
# Copy project to /var/www/html # Copy config
COPY . . COPY ./misc/setup/docker/php.ini /etc/php81/conf.d/settings.ini
# Run composer and clean USER root
RUN composer update --no-cache \ # Create cache folder
&& composer install --no-interaction --optimize-autoloader --no-dev --no-cache \ RUN mkdir /cache && chown -R nobody:nogroup /cache
&& apt autoclean -y \ # Install deps
&& apt autoremove -y \ RUN apk add --no-cache php81-redis php81-zip php81-tokenizer
&& rm -rf /var/lib/apt/lists/* \ USER nobody
&& rm -rf /usr/bin/composer
EXPOSE 80 # Copy source
CMD apachectl -D FOREGROUND COPY --chown=nobody . /var/www/html
# Dependencies
RUN composer install --no-interaction --optimize-autoloader --no-dev --no-cache
EXPOSE 8080

View file

@ -98,12 +98,6 @@ class Wrappers {
// Add URLs to video descriptions // Add URLs to video descriptions
// TODO: Make it work with unicode characters such as emojis // TODO: Make it work with unicode characters such as emojis
$latte->addFunction('render_desc', function (string $desc, array $textExtras = []): string { $latte->addFunction('render_desc', function (string $desc, array $textExtras = []): string {
$bytesCount = strlen($desc);
$charsCount = mb_strlen($desc);
// Skip urlify for now if there is a special char like an emoji to avoid issues
if ($bytesCount !== $charsCount) {
return $desc;
}
$sanitizedDesc = htmlspecialchars($desc); $sanitizedDesc = htmlspecialchars($desc);
$out = $sanitizedDesc; $out = $sanitizedDesc;
foreach ($textExtras as $extra) { foreach ($textExtras as $extra) {

View file

@ -1,7 +1,7 @@
{ {
"name": "pablouser1/proxitok", "name": "pablouser1/proxitok",
"description": "An alternative frontend for TikTok", "description": "An alternative frontend for TikTok",
"version": "2.4.9.1", "version": "2.4.9.2",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"type": "project", "type": "project",
"authors": [ "authors": [
@ -23,8 +23,8 @@
"ext-mbstring": "*", "ext-mbstring": "*",
"latte/latte": "^2.11", "latte/latte": "^2.11",
"bramus/router": "^1.6", "bramus/router": "^1.6",
"josegonzalez/dotenv": "dev-master", "pablouser1/tikscraper": "^2.3",
"pablouser1/tikscraper": "^2.3" "josegonzalez/dotenv": "^4.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

37
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "790ea9098323ef66c520cfe44b92b7d3", "content-hash": "f94f92790bfe52bdf38e6bd9ba80f40a",
"packages": [ "packages": [
{ {
"name": "bramus/router", "name": "bramus/router",
@ -99,16 +99,16 @@
}, },
{ {
"name": "josegonzalez/dotenv", "name": "josegonzalez/dotenv",
"version": "dev-master", "version": "4.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/josegonzalez/php-dotenv.git", "url": "https://github.com/josegonzalez/php-dotenv.git",
"reference": "f6d2fb63610f98b7ae859031566228dbade1a79c" "reference": "e97dbd3db53508dcd536e73ec787a7f11458d41d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/f6d2fb63610f98b7ae859031566228dbade1a79c", "url": "https://api.github.com/repos/josegonzalez/php-dotenv/zipball/e97dbd3db53508dcd536e73ec787a7f11458d41d",
"reference": "f6d2fb63610f98b7ae859031566228dbade1a79c", "reference": "e97dbd3db53508dcd536e73ec787a7f11458d41d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -116,11 +116,10 @@
"php": ">=5.5.0" "php": ">=5.5.0"
}, },
"require-dev": { "require-dev": {
"php-mock/php-mock-phpunit": "^1.1", "php-coveralls/php-coveralls": "~2.0",
"satooshi/php-coveralls": "1.*", "php-mock/php-mock-phpunit": "~1.1||~2.0",
"squizlabs/php_codesniffer": "2.*" "squizlabs/php_codesniffer": "~2.9||~3.7"
}, },
"default-branch": true,
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-0": {
@ -151,9 +150,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/josegonzalez/php-dotenv/issues", "issues": "https://github.com/josegonzalez/php-dotenv/issues",
"source": "https://github.com/josegonzalez/php-dotenv/tree/master" "source": "https://github.com/josegonzalez/php-dotenv/tree/4.0.0"
}, },
"time": "2019-07-07T21:21:39+00:00" "time": "2023-05-29T22:49:26+00:00"
}, },
{ {
"name": "latte/latte", "name": "latte/latte",
@ -614,16 +613,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v5.4.22", "version": "v5.4.24",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b" "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/4b850da0cc3a2a9181c1ed407adbca4733dc839b", "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64",
"reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b", "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -656,7 +655,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v5.4.22" "source": "https://github.com/symfony/process/tree/v5.4.24"
}, },
"funding": [ "funding": [
{ {
@ -672,15 +671,13 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-03-06T21:29:33+00:00" "time": "2023-05-17T11:26:05+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": { "stability-flags": [],
"josegonzalez/dotenv": 20
},
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {

View file

@ -5,7 +5,7 @@ services:
container_name: proxitok-web container_name: proxitok-web
image: ghcr.io/pablouser1/proxitok:master image: ghcr.io/pablouser1/proxitok:master
# ports: # ports:
# - 8080:80 # - 8080:8080
environment: environment:
- LATTE_CACHE=/cache - LATTE_CACHE=/cache
- API_CACHE=redis - API_CACHE=redis
@ -64,6 +64,7 @@ services:
signer: signer:
container_name: proxitok-signer container_name: proxitok-signer
image: ghcr.io/pablouser1/signtok:master image: ghcr.io/pablouser1/signtok:master
init: true
networks: networks:
- proxitok - proxitok
user: nobody user: nobody

View file

@ -0,0 +1,4 @@
variables_order="EGPCS"
[Date]
date.timezone="UTC"
expose_php=Off

View file

@ -8,7 +8,13 @@
</figure> </figure>
<div class="media-content"> <div class="media-content">
<p> <p>
<strong>{$item->author->nickname}</strong> <strong>
{if $item->author->verified}
{include '../icon.latte', icon: 'check-o', text: $item->author->nickname}
{else}
{$item->author->nickname}
{/if}
</strong>
<small> <small>
<a href="{url_user($item->author->uniqueId)}">@{$item->author->uniqueId}</a> <a href="{url_user($item->author->uniqueId)}">@{$item->author->uniqueId}</a>
</small> </small>
@ -34,10 +40,9 @@
<div class="has-text-centered"> <div class="has-text-centered">
{embed '../details.latte', title: "Details"} {embed '../details.latte', title: "Details"}
{block content} {block content}
<p>Is Ad: {bool_to_str($item->isAd)} <p>Can duet: {bool_to_str(isset($item->duetEnabled) ? $item->duetEnabled : boolval($item->duetDisplay))}</p>
<p>Can duet: {bool_to_str($item->duetEnabled)}</p> <p>Can stitch (add this video to other ones): {bool_to_str(isset($item->stitchEnabled) ? $item->stitchEnabled : boolval($item->stitchDisplay))}</p>
<p>Can stitch (add this video to other ones): {bool_to_str($item->stitchEnabled)}</p> <p>Can be shared: {bool_to_str(isset($item->shareEnabled) ? $item->shareEnabled : boolval($item->shareDisplay))}
<p>Can be shared: {bool_to_str($item->shareEnabled)}
{/block} {/block}
{/embed} {/embed}
</div> </div>

View file

@ -12,9 +12,9 @@
</figure> </figure>
<p class="title"> <p class="title">
{if $info->detail->verified} {if $info->detail->verified}
{include '../components/icon.latte', icon: 'check-o', text: $info->detail->uniqueId} {include '../components/icon.latte', icon: 'check-o', text: $info->detail->nickname}
{else} {else}
{$info->detail->uniqueId} {$info->detail->nickname}
{/if} {/if}
</p> </p>
<p class="subtitle">{include '../components/rss.latte'}</p> <p class="subtitle">{include '../components/rss.latte'}</p>