udleinati / redirect.center

Redirect domains using DNS only
http://redirect.center
MIT License
257 stars 49 forks source link

update dependencies and extend path/query/fragment special character support #42

Closed tmackay-cenet closed 2 years ago

tmackay-cenet commented 4 years ago

fixes #39 with .opts-port-. option fixes #22 with .opts-hash. option

also adds support for some common special characters including '%' to allow for URL encoding others and shorthand representation for longer URLs (maintaining backwards compatibility):

'/' => .opts-slash. (._s.) '?' or & => .opts-query. (._q.) '=' => .opts-eq. (._e.) '%' => .opts-percent. (._pc.) '+' => .opts-plus. (._p.) ':' => .opts-colon. (._c.) '#' => .opts-hash. (._h.) '.' => .opts-dot. (._d.)

fixes formatting to prevent eslint complaining on test

fixes and adds some test cases to improve code coverage

updates dependencies

removes deprecated dependencies all-contributors There is now a GitHub Bot for automating the maintenance of your contributors table https://github.com/all-contributors/all-contributors-bot

codacy-coverage Package being deprecated in favor of https://github.com/codacy/codacy-coverage-reporter

opencollective Depends on deprecated version of core-js with a number of issues

udleinati commented 3 years ago

Hi @tmackay-cenet thanks for the PR and sorry for my long delay to check it. Unfortunately, it's getting conflict now. Could you please check? I merged your PR #40. best

tmackay-cenet commented 3 years ago

Hi @udleinati, PR #40 was one of @mike1808's, and is somewhat of incompatible as it introduces a completely different URL encoding scheme which is not backwards compatible with previous versions. Additional logic could be added to detect which encoding scheme has been used, I suppose, but I'm not a fan of the base32 scheme due to size constraints (63 bytes for DNS label names and 253 bytes for the whole thing). Once you get up to including a query string this leaves very little headroom. In practice I quickly encountered CNAMEs that were too long. This PR would override the new base32 scheme as is.

udleinati commented 3 years ago

@tmackay-cenet my mistake during the merge. I'll create backward compatibility today or tomorrow morning. I don't think it's a good idea to add a new encoding type, redirect.center already has people using the base32 encoded query string.

matbrgz commented 2 years ago

Updates?

udleinati commented 2 years ago

I'm closing this issue. Redirect.center was fully refactored on top of nestjs and this pr won't work anymore. The issues might be solved using opts-port or opts-query/base32 options. I'm going to change the url builder to make it easier to understand.