# Kali Linux mirror (pkg.shecan.ir)

> Mirror of the Kali Linux repository (kali-rolling and kali-last-snapshot) for apt.

- Upstream: kali.download
- Mirror URL: <https://mirror-kali.pkg.shecan.ir/kali/>
- Clients: apt
- Service status: <https://pkg.shecan.ir/status.json> (key `kali`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/kali/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/kali.json>
- Integrity comparison with the official source (audit.shecan.ir, also run by Shecan, open source; group `kali`, mirror `shecan`): <https://audit.shecan.ir/#kali>

## Limitations

- apt still verifies the official Kali signatures.
- Plain HTTP is enabled, like the official Kali mirrors; apt verifies signatures either way.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### apt: persistent (user- or system-wide configuration)

Back up first (linux)

```sh
sudo mkdir -p /root/apt-sources.bak && sudo cp -a /etc/apt/sources.list* /root/apt-sources.bak/
```

Run (linux)

```sh
sudo sed -i -E 's#https?://http\.kali\.org/kali#http://mirror-kali.pkg.shecan.ir/kali#' $(grep -rl http.kali.org /etc/apt/sources.list /etc/apt/sources.list.d 2>/dev/null)
```

Run (linux)

```sh
sudo apt update
```

Undo / restore the default (linux)

```sh
sudo cp -a /root/apt-sources.bak/sources.list* /etc/apt/
```
