Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d1554e10e | ||
|
|
ff5bb61891 | ||
|
|
936b418b00 | ||
|
|
ac44f12d85 | ||
|
|
b6f0c644f8 | ||
|
|
66c4b3c911 | ||
|
|
924696c015 |
2
.github/workflows/release-binaries.yaml
vendored
2
.github/workflows/release-binaries.yaml
vendored
@@ -37,4 +37,4 @@ jobs:
|
|||||||
args: release --clean
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
|
# GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
|
||||||
@@ -33,10 +33,10 @@ changelog:
|
|||||||
#brews:
|
#brews:
|
||||||
# -
|
# -
|
||||||
# repository:
|
# repository:
|
||||||
# owner: kubero-dev
|
# owner: everywall
|
||||||
# name: homebrew-ladder
|
# name: homebrew-ladder
|
||||||
# token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}"
|
# token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}"
|
||||||
# homepage: "https://www.kubero.dev"
|
# homepage: "https://www.everyladder.dev"
|
||||||
# description: "Manage your kubero applications with the CLI"
|
# description: "Manage your everyladder applications modify every website"
|
||||||
# test: |
|
# test: |
|
||||||
# system "#{bin}/kubero", "--version"
|
# system "#{bin}/everyladder", "--version"
|
||||||
13
README.md
13
README.md
@@ -3,7 +3,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1 align="center">Ladder</h1>
|
<h1 align="center">Ladder</h1>
|
||||||
<div><img alt="License" src="https://img.shields.io/github/license/kubero-dev/ladder"> <img alt="go.mod Go version " src="https://img.shields.io/github/go-mod/go-version/kubero-dev/ladder"> <img alt="GitHub tag (with filter)" src="https://img.shields.io/github/v/tag/kubero-dev/ladder"> <img alt="GitHub (Pre-)Release Date" src="https://img.shields.io/github/release-date-pre/kubero-dev/ladder"> <img alt="GitHub Downloads all releases" src="https://img.shields.io/github/downloads/kubero-dev/ladder/total"> <img alt="GitHub Build Status (with event)" src="https://img.shields.io/github/actions/workflow/status/kubero-dev/ladder/release-binaries.yaml"></div>
|
<div><img alt="License" src="https://img.shields.io/github/license/everywall/ladder"> <img alt="go.mod Go version " src="https://img.shields.io/github/go-mod/go-version/everywall/ladder"> <img alt="GitHub tag (with filter)" src="https://img.shields.io/github/v/tag/everywall/ladder"> <img alt="GitHub (Pre-)Release Date" src="https://img.shields.io/github/release-date-pre/everywall/ladder"> <img alt="GitHub Downloads all releases" src="https://img.shields.io/github/downloads/everywall/ladder/total"> <img alt="GitHub Build Status (with event)" src="https://img.shields.io/github/actions/workflow/status/everywall/ladder/release-binaries.yaml"></div>
|
||||||
|
|
||||||
|
|
||||||
*Ladder is a web proxy to help bypass paywalls.* This is a selfhosted version of [1ft.io](https://1ft.io) and [12ft.io](https://12ft.io). It is inspired by [13ft](https://github.com/wasi-master/13ft).
|
*Ladder is a web proxy to help bypass paywalls.* This is a selfhosted version of [1ft.io](https://1ft.io) and [12ft.io](https://12ft.io). It is inspired by [13ft](https://github.com/wasi-master/13ft).
|
||||||
@@ -23,7 +23,7 @@ Freedom of information is an essential pillar of democracy and informed decision
|
|||||||
- [x] Fetch RAW HTML
|
- [x] Fetch RAW HTML
|
||||||
- [x] Custom User Agent
|
- [x] Custom User Agent
|
||||||
- [x] Custom X-Forwarded-For IP
|
- [x] Custom X-Forwarded-For IP
|
||||||
- [x] [Docker container](https://github.com/kubero-dev/ladder/pkgs/container/ladder) (amd64, arm64)
|
- [x] [Docker container](https://github.com/everywall/ladder/pkgs/container/ladder) (amd64, arm64)
|
||||||
- [x] Linux binary
|
- [x] Linux binary
|
||||||
- [x] Mac OS binary
|
- [x] Mac OS binary
|
||||||
- [x] Windows binary (untested)
|
- [x] Windows binary (untested)
|
||||||
@@ -47,18 +47,18 @@ Some sites do not expose their content to search engines, which means that the p
|
|||||||
> **Warning:** If your instance will be publicly accessible, make sure to enable Basic Auth. This will prevent unauthorized users from using your proxy. If you do not enable Basic Auth, anyone can use your proxy to browse nasty/illegal stuff. And you will be responsible for it.
|
> **Warning:** If your instance will be publicly accessible, make sure to enable Basic Auth. This will prevent unauthorized users from using your proxy. If you do not enable Basic Auth, anyone can use your proxy to browse nasty/illegal stuff. And you will be responsible for it.
|
||||||
|
|
||||||
### Binary
|
### Binary
|
||||||
1) Download binary [here](https://github.com/kubero-dev/ladder/releases/latest)
|
1) Download binary [here](https://github.com/everywall/ladder/releases/latest)
|
||||||
2) Unpack and run the binary `./ladder`
|
2) Unpack and run the binary `./ladder`
|
||||||
3) Open Browser (Default: http://localhost:8080)
|
3) Open Browser (Default: http://localhost:8080)
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
```bash
|
```bash
|
||||||
docker run -p 8080:8080 -d --name ladder ghcr.io/kubero-dev/ladder:latest
|
docker run -p 8080:8080 -d --name ladder ghcr.io/everywall/ladder:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
```bash
|
```bash
|
||||||
curl https://raw.githubusercontent.com/kubero-dev/ladder/main/docker-compose.yaml --output docker-compose.yaml
|
curl https://raw.githubusercontent.com/everywall/ladder/main/docker-compose.yaml --output docker-compose.yaml
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ http://localhost:8080/ruleset
|
|||||||
| `LOG_URLS` | Log fetched URL's | `true` |
|
| `LOG_URLS` | Log fetched URL's | `true` |
|
||||||
| `DISABLE_FORM` | Disables URL Form Frontpage | `false` |
|
| `DISABLE_FORM` | Disables URL Form Frontpage | `false` |
|
||||||
| `FORM_PATH` | Path to custom Form HTML | `` |
|
| `FORM_PATH` | Path to custom Form HTML | `` |
|
||||||
| `RULESET` | URL to a ruleset file | `https://raw.githubusercontent.com/kubero-dev/ladder/main/ruleset.yaml` or `/path/to/my/rules.yaml` |
|
| `RULESET` | URL to a ruleset file | `https://raw.githubusercontent.com/everywall/ladder/main/ruleset.yaml` or `/path/to/my/rules.yaml` |
|
||||||
| `EXPOSE_RULESET` | Make your Ruleset available to other ladders | `true` |
|
| `EXPOSE_RULESET` | Make your Ruleset available to other ladders | `true` |
|
||||||
| `ALLOWED_DOMAINS` | Comma separated list of allowed domains. Empty = no limitations | `` |
|
| `ALLOWED_DOMAINS` | Comma separated list of allowed domains. Empty = no limitations | `` |
|
||||||
| `ALLOWED_DOMAINS_RULESET` | Allow Domains from Ruleset. false = no limitations | `false` |
|
| `ALLOWED_DOMAINS_RULESET` | Allow Domains from Ruleset. false = no limitations | `false` |
|
||||||
@@ -128,6 +128,7 @@ See in [ruleset.yaml](ruleset.yaml) for an example.
|
|||||||
x-forwarded-for: none # override X-Forwarded-For header or delete with none
|
x-forwarded-for: none # override X-Forwarded-For header or delete with none
|
||||||
referer: none # override Referer header or delete with none
|
referer: none # override Referer header or delete with none
|
||||||
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
|
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
|
||||||
|
content-security-policy: script-src 'self'; # override response header
|
||||||
cookie: privacy=1
|
cookie: privacy=1
|
||||||
regexRules:
|
regexRules:
|
||||||
- match: <script\s+([^>]*\s+)?src="(/)([^"]*)"
|
- match: <script\s+([^>]*\s+)?src="(/)([^"]*)"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
ladder:
|
ladder:
|
||||||
image: ghcr.io/kubero-dev/ladder:latest
|
image: ghcr.io/everywall/ladder:latest
|
||||||
container_name: ladder
|
container_name: ladder
|
||||||
#build: .
|
#build: .
|
||||||
#restart: always
|
#restart: always
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a href="https://github.com/kubero-dev/ladder">
|
<a href="https://github.com/everywall/ladder">
|
||||||
<div class="github-corner" aria-label="View source on GitHub">
|
<div class="github-corner" aria-label="View source on GitHub">
|
||||||
<svg
|
<svg
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ func ProxySite(c *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.Set("Content-Type", resp.Header.Get("Content-Type"))
|
c.Set("Content-Type", resp.Header.Get("Content-Type"))
|
||||||
|
c.Set("Content-Security-Policy", resp.Header.Get("Content-Security-Policy"))
|
||||||
|
|
||||||
return c.SendString(body)
|
return c.SendString(body)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,6 +113,10 @@ func fetchSite(urlpath string, queries map[string]string) (string, *http.Request
|
|||||||
return "", nil, nil, err
|
return "", nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if rule.Headers.CSP != "" {
|
||||||
|
resp.Header.Set("Content-Security-Policy", rule.Headers.CSP)
|
||||||
|
}
|
||||||
|
|
||||||
log.Print("rule", rule)
|
log.Print("rule", rule)
|
||||||
body := rewriteHtml(bodyB, u, rule)
|
body := rewriteHtml(bodyB, u, rule)
|
||||||
return body, req, resp, nil
|
return body, req, resp, nil
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ type Rule struct {
|
|||||||
XForwardedFor string `yaml:"x-forwarded-for,omitempty"`
|
XForwardedFor string `yaml:"x-forwarded-for,omitempty"`
|
||||||
Referer string `yaml:"referer,omitempty"`
|
Referer string `yaml:"referer,omitempty"`
|
||||||
Cookie string `yaml:"cookie,omitempty"`
|
Cookie string `yaml:"cookie,omitempty"`
|
||||||
|
CSP string `yaml:"content-security-policy,omitempty"`
|
||||||
} `yaml:"headers,omitempty"`
|
} `yaml:"headers,omitempty"`
|
||||||
GoogleCache bool `yaml:"googleCache,omitempty"`
|
GoogleCache bool `yaml:"googleCache,omitempty"`
|
||||||
RegexRules []Regex `yaml:"regexRules"`
|
RegexRules []Regex `yaml:"regexRules"`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: ladder
|
name: ladder
|
||||||
description: A helm chart to deploy kubero-dev/ladder
|
description: A helm chart to deploy everywall/ladder
|
||||||
type: application
|
type: application
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
appVersion: "v0.0.11"
|
appVersion: "v0.0.11"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
image:
|
image:
|
||||||
RELEASE: ghcr.io/kubero-dev/ladder:v0.0.11
|
RELEASE: ghcr.io/everywall/ladder:latest
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PORT: 8080
|
PORT: 8080
|
||||||
@@ -10,7 +10,7 @@ env:
|
|||||||
LOG_URLS: "true"
|
LOG_URLS: "true"
|
||||||
DISABLE_FORM: "false"
|
DISABLE_FORM: "false"
|
||||||
FORM_PATH: ""
|
FORM_PATH: ""
|
||||||
RULESET: "https://raw.githubusercontent.com/kubero-dev/ladder/main/ruleset.yaml"
|
RULESET: "https://raw.githubusercontent.com/everywall/ladder/main/ruleset.yaml"
|
||||||
EXPOSE_RULESET: "true"
|
EXPOSE_RULESET: "true"
|
||||||
ALLOWED_DOMAINS: ""
|
ALLOWED_DOMAINS: ""
|
||||||
ALLOWED_DOMAINS_RULESET: "false"
|
ALLOWED_DOMAINS_RULESET: "false"
|
||||||
|
|||||||
@@ -161,4 +161,5 @@
|
|||||||
referer: https://t.co/x?amp=1
|
referer: https://t.co/x?amp=1
|
||||||
x-forwarded-for: none
|
x-forwarded-for: none
|
||||||
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
|
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
|
||||||
|
content-security-policy: script-src 'self';
|
||||||
cookie:
|
cookie:
|
||||||
Reference in New Issue
Block a user