Skip to content

Initial docs draft #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
12 changes: 0 additions & 12 deletions blog/2019-05-28-first-blog-post.md

This file was deleted.

44 changes: 0 additions & 44 deletions blog/2019-05-29-long-blog-post.md

This file was deleted.

20 changes: 0 additions & 20 deletions blog/2021-08-01-mdx-blog-post.mdx

This file was deleted.

Binary file not shown.
25 changes: 0 additions & 25 deletions blog/2021-08-26-welcome/index.md

This file was deleted.

17 changes: 0 additions & 17 deletions blog/authors.yml

This file was deleted.

4 changes: 4 additions & 0 deletions docs/developer/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Developer",
"position": 5
}
35 changes: 35 additions & 0 deletions docs/developer/contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_position: 2
---

# Contribute

Thanks for your interest in contributing to Ladder.

Please take a moment to review this page before submitting your first pull request. We also strongly recommend that you check for open issues and pull requests to see if someone else is working on something similar.

## Contribute rules

1. Test your rule with a variety of browsers and on both mobile & desktop devices.

2. Open a pull request in the [everywall/ladder-rules](https://github.com/everywall/ladder-rules) repository.

> To prevent rulesets from getting disorganized, rulesets are saved in a directory structure according to the site's country.

## Contribute to Ladder

### New feature guidelines

New features should be linked to an existing feature request. If you have ideas for a larger feature, please open an issue first.

1. Fork or clone the repo

2. Create a new branch to work on your bug fix or feature

3. Open a pull request in the [everywall/ladder](https://github.com/everywall/ladder) repository.

Ladder is a a [Go Fiber](https://gofiber.io/) application. Please see their documentation for more information about the Go Fiber framework.

### Documentation

The documentation for this project is located at [everywall/everywall.github.io](https://github.com/everywall/everywall.github.io). When contributing a feature, please make an accompanying pull request to update documentation, if applicable.
41 changes: 41 additions & 0 deletions docs/developer/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_position: 1
---

# Setup

## Development server

:::info

Optional: To run a development server with live-reload using [cosmtrek/air](https://github.com/cosmtrek/air)

1. Install air according to the [installation instructions](https://github.com/cosmtrek/air#installation).

2. Clone the project repo:

```bash
git clone [email protected]:everywall/ladder.git
```

3. Run a development server at http://localhost:8080:

```bash
air
```

:::

Run a development server at http://localhost:8080:

```bash
git clone [email protected]:everywall/ladder.git
git submodule update --init --recursive
echo "dev " > handlers/VERSION
echo "dev " > cmd/VERSION
RULESET="./ruleset.yaml" go run cmd/main.go
```

## Tailwind CSS

This project uses [pnpm](https://pnpm.io/) to build a stylesheet with the [Tailwind CSS](https://tailwindcss.com/) classes. For local development, if you modify styles in `form.html`, `playground.html`, `generate_readable_outline.html` or `error_page.html`, run `pnpm build` to generate a new stylesheet.
4 changes: 4 additions & 0 deletions docs/install/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Install",
"position": 2
}
15 changes: 15 additions & 0 deletions docs/install/binary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 2
---

# Binary

:::caution

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.

:::

1. Download the binary for your OS [here](https://github.com/everywall/ladder/releases/latest)
2. Unpack and run the binary `./ladder -r https://t.ly/14PSf`
3. Open Browser (Default: http://localhost:8080)
36 changes: 36 additions & 0 deletions docs/install/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
sidebar_position: 1
---

# Docker

:::caution

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.

:::

## Docker compose

```yaml title="docker-compose.yaml"
version: "3"
services:
ladder:
image: ghcr.io/everywall/ladder:latest
container_name: ladder
build: .
restart: always
environment:
- PORT=8080
- RULESET=https://raw.githubusercontent.com/everywall/ladder-rules/main/rulesets
ports:
- "8080:8080"
```

Other environment variables can be updated as to your preferences, with details on each variable listed in [environment variables](environment-variables.md).

## Docker run

```bash
docker run -p 8080:8080 -d --env RULESET=https://t.ly/DA3n6 --name ladder ghcr.io/everywall/ladder:latest
```
22 changes: 22 additions & 0 deletions docs/install/environment-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_position: 4
---

# Environment variables

| Variable | Description | Default Value |
| ------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `PORT` | Port to listen on | `8080` |
| `PREFORK` | Spawn multiple server instances | `false` |
| `USER_AGENT` | User agent to emulate | `Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)` |
| `X_FORWARDED_FOR` | IP forwarder address | `66.249.66.1` |
| `USERPASS` | Enables Basic Auth, format `admin:123456` | `` |
| `LOG_URLS` | Log fetched URL's | `true` |
| `DISABLE_FORM` | Disables URL Form Frontpage | `false` |
| `FORM_PATH` | Path to custom Form HTML | `` |
| `RULESET` | Path or URL to a ruleset file, accepts local directories | `https://raw.githubusercontent.com/everywall/ladder-rules/main/rulesets` or `/path/to/my/rules.yaml` or `/path/to/my/rules/` |
| `EXPOSE_RULESET` | Make your Ruleset available to other ladders | `true` |
| `ALLOWED_DOMAINS` | Comma separated list of allowed domains. Empty = no limitations | `` |
| `ALLOWED_DOMAINS_RULESET` | Allow Domains from Ruleset. false = no limitations | `false` |

`ALLOWED_DOMAINS` and `ALLOWED_DOMAINS_RULESET` are joined together. If both are empty, no limitations are applied.
44 changes: 44 additions & 0 deletions docs/install/kubernetes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sidebar_position: 3
---

# Kubernetes

:::caution

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.

:::

You can deploy Ladder on Kubernetes using the [Helm chart](https://github.com/everywall/ladder/tree/main/helm-chart).

## Deployment prerequisites

### Values

Edit the values to your own preferences, with the only minimum requirement being `ingress.HOST` (line 19) being updated to your intended domain name.

Other variables in `values.yaml` can be updated as to your preferences, with details on each variable listed in [environment variables](environment-variables.md).

### Defaults in Kubernetes

No ingress default has been specified.
You can set this manually by adding an annotation to the ingress.yaml - if needed.
For example, to use Traefik -

```yaml
metadata:
name: ladder-ingress
annotations:
kubernetes.io/ingress.class: traefik
```

## Helm Install

`helm install <name> <location> -n <namespace-name> --create-namespace`
`helm install ladder .\ladder\ -n ladder --create-namespace`

## Helm Upgrade

`helm upgrade <name> <location> -n <namespace-name>`
`helm upgrade ladder .\ladder\ -n ladder`
47 changes: 0 additions & 47 deletions docs/intro.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Tutorial - Extras",
"position": 3,
"label": "Modifiers",
"position": 4,
"link": {
"type": "generated-index"
}
Expand Down
Loading