15 Commits

Author SHA1 Message Date
f8b23a88f3 chore: Refactor workflow and Makefile, remove test files 2024-10-22 19:06:06 +08:00
Nova Kwok
89ea0affa3
Add MAX_CACHE_SIZE config (#344)
* Add MAX_CACHE_SIZE

* Bump actions version

* Optimize code

* Use Ticker to control GC loop
2024-06-29 16:42:00 +08:00
BugFest
4003b03022
Multiple backends support (#207)
* Fix: h2non/filetype upgraded to support avif signatures

* Fix: make clean updated to include test/output dirs

* Feature: multi-backend support via IMG_MAP config key as described in #217

* feat: implement both local and remote (proxyMode) mappings for multi-backend

* Feature: multi-backend support via IMG_MAP config key as described in #217

* fix: go-is-svg should be direct import

* fix: imgMap paths are relative to CWD

* feature: IMG_MAP is parsed on start

---------

Co-authored-by: Nova Kwok <n0vad3v@riseup.net>
2023-08-02 23:33:54 +08:00
Nova Kwok
5dba6bba15
M1 should be arm64 (#263) 2023-07-29 20:09:29 +08:00
Nova Kwok
8d0ecdf4e0
Use QEMU to release ARM64 binary as well (#246) 2023-07-05 15:30:44 +08:00
Benny
13281d929b
add some tests (#239)
* add some tests

* remove template

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-07-03 17:01:13 +08:00
Benny
23bbed8ce6
Refactor review (#220)
* runnable

* convert is working

* some refactoring

* update go.mod

* fix some TODOs

* add TODO

* update go mod

* rebase onto master

* fix #234

2: 5.9s - 7.6MB
4: 26s - 6.9MB

* fix malloc tests

* fix malloc tests

* remote TODO

* add X-Real-IP #236

* Better localRawImagePath

* remove some wrong comments

* Bump version to 0.9.0

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-06-27 15:43:43 +02:00
Nova Kwok
9268ada0b3
A better way to handle remote content-type, fix etag (#216)
* A better way to handle remote content-type, fix etag

* Check for err

* Optimize on fetchRemoteImage

* Write 600 permission

* Implement simple lock for write operation

* Removing typo

* Removing typo

* Setup cache

* Fix CI

* Fix retry and remove genEtag

* Fix error note

* remove duplicate Get

* WTF

* Fix tests

* remove broken test

* Fix broken tests
2023-05-29 19:41:39 +08:00
Nova Kwok
dc4da7bae4
Add golangci/golangci-lint (#181)
* Add golangci/golangci-lint

* Fix golanglint
2023-03-18 22:24:06 +08:00
BennyThink
67d40b4397
CI and minor fixes
* use GitHub Actions as CI
* bump versions
* Makefile and Dockerfile improvements
* upgrade logrus
2021-12-05 19:21:29 +08:00
Benny
f5e7ee5273
take advantage of build cache #66 (#67) 2020-12-26 22:12:33 +08:00
Benny
0c08f65be1
fix unsupported browser + proxyMode bug, return 400 for not allow files instead of 500 (#64)
unsupported browser will go for origin, while in proxyMode we don't have cache images.

resolve #61
2020-12-06 14:02:17 +08:00
Benny
08c333f3cd
Fiber v2, code format, typo,test case, go 1.15 and more (#54)
* upgrade to fiber v2

* code format

* remove redundant variables
* remove useless exportable variables/functions

* go mod replace

use our own mirror now.

* add test case for converter, use deferInit to make test more simple

* remove useless file and fix typo

* Makefile change
* upgrade to go 1.15
* remove wrong go test comments

* complete test case, coverage, coverage badge

* Fix version typo

* config struct fix

* add banner, show version, add server header, remove fiber startup message

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2020-11-21 13:26:03 +08:00
n0vad3v
156f815935
Fix Makefile 2020-03-04 20:54:09 +08:00
n0vad3v
73884394d9
Travis CI auto build to release 2020-02-29 18:39:00 +08:00