Commit Graph
196 Commits
Author SHA1 Message Date
DIYgod e5397f9e3e feat: export common-utils 2024-02-28 19:34:15 +08:00
DIYgod 85ad31e260 feat: render export 2024-02-28 14:58:50 +08:00
DIYgod 5645b8466a test: mock client ip 2024-02-26 22:38:18 +08:00
DIYgod 373b188e0c test: timezone 2024-02-26 22:05:03 +08:00
DIYgod a6b7b17131 feat: use @fullerstack/nax-ipware and add helpers test 2024-02-26 21:30:38 +08:00
DIYgod 719af9073c test: middleware cache 2024-02-26 17:32:06 +08:00
DIYgod 5ea8712345 test: utils cache 2024-02-26 17:05:33 +08:00
DIYgod d1a4e19c62 fix: typescript build errors 2024-02-25 23:43:34 +08:00
DIYgod b8a2301590 test: pac-proxy and unify-proxy 2024-02-25 17:16:10 +08:00
DIYgod a153d4cbcc test: valid-host 2024-02-25 02:10:10 +08:00
DIYgod 01e142ccaf test: wechat-mp 2024-02-25 02:08:35 +08:00
DIYgod bdf8ace129 feat: typescript utils 2024-02-25 01:48:56 +08:00
DIYgod d022fabda6 test: puppeteer-utils 2024-02-25 01:42:39 +08:00
DIYgod 131c7d4b79 feat: remove utils/parse-date and utils/date 2024-02-25 01:25:55 +08:00
DIYgod 1a8160a224 test: common-config 2024-02-25 00:55:51 +08:00
DIYgod 31140d0b59 test: wait 2024-02-25 00:34:52 +08:00
DIYgod 33861197f0 test: rss-parser 2024-02-25 00:33:10 +08:00
DIYgod 031af3f755 test: request-wrapper 2024-02-25 00:24:49 +08:00
DIYgod db59d44617 test: rand-user-agent 2024-02-24 23:45:45 +08:00
DIYgod cf09a77e25 test: parse-date 2024-02-24 23:40:23 +08:00
DIYgod cd0043b774 test: md5 2024-02-24 23:14:55 +08:00
DIYgod a2686197eb test: got 2024-02-24 23:12:37 +08:00
DIYgod cb17e72f31 test: common-utils 2024-02-24 22:30:29 +08:00
DIYgod 0d606a06c2 test: move test files to lib 2024-02-21 19:46:18 +08:00
DIYgod 33ec0fbbb4 fix: use require for proxy-chain 2024-01-31 02:43:05 +08:00
DIYgod 2e7bd66940 test: puppeteer 2024-01-31 02:14:48 +08:00
DIYgod 174752fef5 refactor: format 2024-01-29 23:28:17 +08:00
DIYgod 493cdc19ba chore: recover format 2024-01-29 23:28:03 +08:00
DIYgod 498af241af feat: cache init 2024-01-29 22:39:04 +08:00
DIYgod d5e38c8f5d feat: use npm directory-import 2024-01-25 13:29:00 +08:00
DIYgod 2550b6ecf6 feat: request wrapper 2024-01-21 23:34:25 +08:00
DIYgod 4591116733 fix: middleware errors 2024-01-21 18:35:11 +08:00
DIYgod e7e3f689bd fix: error handler and debug info 2024-01-21 15:41:42 +08:00
DIYgod 847724cad1 feat: work with hono and typescript 2024-01-21 11:55:18 +08:00
Tony 6d901cb7dc style(eslint): add eslint-unicorn (#14257)
* style: add eslint-unicorn

* style: fix unicorn/no-useless-spread

* style: fix unicorn/no-useless-promise-resolve-reject

* style: fix unicorn/no-for-loop

* fix: codeql bad HTML filtering regexp

* fix: codeql incomplete replace

* fix: unicorn/no-abusive-eslint-disable

* style: fix unicorn/no-new-array

* style: fix unicorn/no-typeof-undefined

* style: fix unicorn/no-zero-fractions

* style: fix unicorn/no-empty-file

* style: fix unicorn/prefer-date-now

* revert: auto fix unicorn/prefer-switch on lib/v2/kuaidi100/utils.js

* style: fix unicorn/prefer-array-find

* style: fix unicorn/prefer-array-flat

* style: fix unicorn/prefer-array-flat-map

* style: fix unicorn/prefer-at

* style: fix unicorn/prefer-string-starts-ends-with

* style: fix unicorn/prefer-includes

* fix: codeql URL substring sanitization

* style: fix unicorn/prefer-optional-catch-binding

* style: fix unicorn/catch-error-name

* style: fix unicorn/escape-case

* style: fix unicorn/prefer-native-coercion-functions

* style: fix unicorn/prefer-regexp-test

* style: fix unicorn/require-array-join-separator

* style: fix unicorn/prefer-math-trunc

* style: fix unicorn/prefer-negative-index

* style: fix unicorn/prefer-dom-node-dataset

* style: fix unicorn/prefer-dom-node-text-content

* style: fix unicorn/prefer-query-selector

* style: fix unicorn/no-array-for-each

* style: fix unicorn/no-negated-condition

* style: fix unicorn/prefer-add-event-listener

* style: fix unicorn/import-style

* style: fix prefer-regex-literals

* style: disable unicorn/no-useless-switch-case

* style: disable unicorn/text-encoding-identifier-case

* style: fix unicorn/prefer-set-has

* style: fix unicorn/prefer-spread

* revert: auto fix on lib/routes/universities/ynnu/edu/base64.js

* style: fix unicorn/no-useless-undefined

* style: fix unicorn/no-array-push-push

* style: fix unicorn/no-useless-undefined again

* style: fix unicorn/no-lonely-if

* style: fix unicorn/prefer-reflect-apply

* style: fix unicorn/switch-case-braces

* style: fix unicorn/prefer-switch

* style: fix unicorn/prefer-array-some

* fix: deepscan UNUSED_VAR_ASSIGN

* style: fix unicorn/prefer-ternary

* fix: follow-up of unicorn/prefer-ternary

* revert: auto fix of unicorn/prefer-string-slice for substring()

* style: disable unicorn/prefer-string-slice

fix: auto fix slice over deprecated substr

* style: fix unicorn/throw-new-error

* style: fix unicorn/filename-case

* test: fix dateParser renaming

* style: fix unicorn/better-regex

* style: fix unicorn/prefer-string-replace-all

* fix(deps): add sanitize-html

* style: fix no-prototype-builtins

* style: fix unicorn/consistent-destructuring

* style: fix unicorn/consistent-function-scoping

* style: fix unicorn/prefer-regexp-test

* style: fix unicorn/prefer-logical-operator-over-ternary

* style: fix unicorn/no-array-callback-reference

* style: add prefer-object-has-own

* style: warn unicorn/no-empty-file

* style: fix unicorn/prefer-number-properties

* style: fix no-useless-undefined again

* style: fix unicorn/numeric-separators-style

* style: disable unicorn/no-array-callback-reference

false postive with cheerio
2024-01-18 20:43:40 +08:00
JimenezLi 0e70524248 feat(proxy): add PAC script support (#14218)
* feat(proxy): add PAC script support

* fix pnpm fail

* fix coverage

* fix coverage final

* update docs
2024-01-13 02:35:56 +00:00
Tony 1f90b69973 fix: adjust http log level (#14114)
* feat: log redirect

* fix: change puppeteer/proxy/redirect/got log level to `http`

ref: https://github.com/winstonjs/winston#logging-levels (npm levels)
2023-12-26 02:23:33 +08:00
DIYgod a63c86a049 feat: remove notOperational routes - design 2023-12-20 00:35:56 +08:00
Tony a1644ac4ca feat: title case following The Chicago Manual of Style (#14048) 2023-12-15 22:37:12 +08:00
3a5488acdc feat: Support RSS3 UMS output format (#13900)
* feat: support RSS3 UMS output

also optimized middleware/template

* fix: rss3_ums function name

* feat: handle current timestamp in UMS

* feat: add authors

* chore: update UMS type

* chore(deps-dev): bump @types/react from 18.2.37 to 18.2.38 in /website (#2249)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.37 to 18.2.38.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/markdown-it in /website (#2250)

Bumps [@types/markdown-it](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/markdown-it) from 13.0.6 to 13.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/markdown-it)

---
updated-dependencies:
- dependency-name: "@types/markdown-it"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/react-dom in /website (#2252)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.15 to 18.2.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/react-dom in /website (#2255)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.16 to 18.2.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update lib/middleware/template.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update lib/middleware/template.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update lib/utils/render.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update lib/views/rss3-ums.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update lib/views/rss3-ums.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update lib/utils/render.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* doc: update UMS related docs

* Update parameter.md

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update parameter.md

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 01:32:24 +08:00
Tony 744ae49151 chore(deps): swap rand-user-agent package (#13441) 2023-09-30 00:38:00 +08:00
Tony eb1a40aa88 chore: fix random ua generation (#13356) 2023-09-22 03:32:48 +08:00
JimenezLi 121763bb6d feat(core): add logger timestamp (#13165)
* feat(core): add logger timestamp

* Update website/docs/install/README.md

---------
2023-08-31 00:18:48 +08:00
DIYgod 27eda52681 fix: logger.debug 2023-07-24 03:11:26 +01:00
DIYgod f1660e9723 feat: expand the scope of retries and set proxy strategy 2023-07-24 02:38:24 +01:00
DIYgod 030043347a feat: exclude some requests for reverse proxy 2023-07-24 01:57:22 +01:00
DIYgod 3da47b69ed fix: reverse proxy fails for some requests 2023-07-24 01:04:46 +01:00
DIYgod 541cae4397 test: fix empty request error and remove node 16 support 2023-07-23 21:41:12 +01:00
DIYgod cd6b5e0f0b feat: bypass reverse proxy for requests with cookies 2023-07-23 21:28:00 +01:00
DIYgod d7224338a5 test: fix empty request error 2023-07-23 20:44:57 +01:00