everywall / ladder

Selfhosted alternative to 12ft.io. and 1ft.io bypass paywalls with a proxy ladder and remove CORS headers from any URL
GNU General Public License v3.0
4.29k stars 169 forks source link

Add feature to modify URLs in ruleset | Fix Relative URLs #31

Closed deoxykev closed 7 months ago

deoxykev commented 7 months ago

This PR adds a feature to modify the requested URL. This is useful for getting the AMP, Search Engine Cache or Archive site versions of a site.

The proposed ruleset API would look like this:

  urlMods:
    query:
      - key: amp
        value: 1

(this would have the effect of appending ?amp=1 to the end of the requested domain.

A working example has been added to fix https://github.com/everywall/ladder/issues/30


There is also an API to modify the Domain and Path of the URL by regex, which I have briefly documented in the README.md.

deoxykev commented 7 months ago

This will also fix https://github.com/everywall/ladder/issues/3

mms-gianni commented 7 months ago

Nice work @deoxykev !