Commit Graph

28 Commits

Author SHA1 Message Date
iacore 079993e801 Use proper rate limiter
Rename package handlers to middleware, since most are middleware

router.go is not middleware. can be moved out to router/router.go
2024-09-25 05:05:04 +00:00
perennial c3bb477132 Rename token management environment variables
This commit clarifies the purpose of certain environment variables
by explicitly associating them with token management. The variables
PIXIVFE_MAX_RETRIES, PIXIVFE_BASE_TIMEOUT, and PIXIVFE_MAX_BACKOFF_TIME
are now prefixed with "TOKEN_" to better distinguish them from API-level
settings.

The ServerConfig struct, configuration loading, logging,
and documentation have been updated accordingly.
2024-09-24 19:32:14 +10:00
perennial ae031dbd8b Add option to disable image proxy checker
This commit introduces a new configuration option to disable the image proxy
checker. A new environment variable PIXIVFE_PROXY_CHECK_ENABLED and
corresponding ServerConfig field are added. The main.go file is updated
to conditionally initialise the proxy checker based on this setting.

Documentation is also updated to explain the new configuration options.
2024-09-24 19:08:40 +10:00
perennial d1534682e2 Implement random User-Agent selection
This commit introduces a mechanism for randomly selecting User-Agents
from a predefined list to be used for requests to the Pixiv API.

References to setting a custom User-Agent via the PIXIVFE_USERAGENT
environment variable have been removed as it is no longer used.
2024-09-23 22:30:26 +10:00
perennial d5fe921c2b docs: fix headings on env vars page 2024-09-23 15:29:06 +10:00
perennial b49e8609ae docs: network proxy configuration
ref: https://codeberg.org/VnPower/PixivFE/pulls/111
2024-09-23 15:25:25 +10:00
perennial 5401381de8 Rename to build.sh 2024-09-23 14:27:40 +10:00
perennial 67df71a48b Back to a plain shell script 2024-09-23 14:21:45 +10:00
perennial 8a2f817ae6 Add configurable repository URL
This commit introduces a new PIXIVFE_REPO_URL configuration option,
allowing users to specify a custom repository URL.

The about page now uses this configurable URL, and the configuration
loading process has been updated to validate and handle the new option.

Documentation has been updated to reflect these changes.
2024-09-22 20:57:29 +10:00
perennial 3d6f5ace8c fix type bug 2024-09-19 16:41:52 +10:00
perennial 21deae4887 docs: modify headings on env var page 2024-09-19 16:34:07 +10:00
perennial bc19f485a2 Add separate API request level backoff mechanism
Implement new backoff settings for API requests, distinct from token
management backoff.

Update config, core request handling, and documentation to reflect the
new API request backoff mechanism. Refactor TokenManager to use the
manager's baseTimeout instead of individual token timeouts.
2024-09-19 16:27:22 +10:00
perennial a5418aa9ce docs: use existent tagged release as example 2024-09-18 01:20:16 +10:00
VnPower eed11702e8 Change some wordings 2024-09-17 20:44:54 +07:00
perennial 7e31f1532b docs: mention available Docker image tags 2024-09-17 16:17:46 +10:00
perennial 923c5574c1 docs: fix env vars page 2024-09-17 01:37:55 +10:00
perennial 3205c8a43b docs: update token guide with using multiple tokens 2024-09-17 01:35:06 +10:00
perennial 49d345e1fc docs: update token guide with info from #36
ref: https://codeberg.org/VnPower/PixivFE/issues/36#issuecomment-2315859
2024-09-17 01:12:47 +10:00
perennial 039b3674ad docs: fix headings 2 2024-09-16 22:35:55 +10:00
perennial 71e5d4a0ba docs: fix heading 2024-09-16 21:19:43 +10:00
perennial 89f9c61dc9 docs: update with Make instructions 2024-09-16 21:19:43 +10:00
perennial 87a941f0cd docs: document PIXIVFE_TOKEN_LOAD_BALANCING 2024-09-14 17:53:26 +10:00
perennial ba6f2c78a1 Docker: Update config and simplify deployment
- Update Dockerfile to use golang 1.23.1 with Alpine
- Switch base image to scratch
- Replace docker-compose.yml with compose.yaml and update configuration
- Remove unnecessary files (entrypoint.sh, pixivfe_token.txt)
- Simplify token management
- Update documentation
2024-09-12 01:37:25 +10:00
perennial b0e146ca66 docs: rework hosting index.md 2024-09-11 22:24:10 +10:00
perennial 5a2b01b688 docs: fix broken links 2 2024-09-11 18:22:10 +10:00
perennial 31983ed794 docs: rename hosting-image-proxy-server.md 2024-09-11 18:21:06 +10:00
perennial 606e3e13f4 docs: fix broken links 2024-09-11 18:20:11 +10:00
perennial 75a61e044c docs: move hosting docs to separate dir 2024-09-11 18:14:50 +10:00