mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-06 19:46:52 +03:00
Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16c174d624 | ||
|
|
1c02a2208b | ||
|
|
2c93e98755 | ||
|
|
66b179f282 | ||
|
|
4bbaae776c | ||
|
|
e31f313819 | ||
|
|
bd0e33781f | ||
|
|
ade2b844ec | ||
|
|
6f997a6e73 | ||
|
|
744de6aec2 | ||
|
|
ae06de8189 | ||
|
|
1663f6665f | ||
|
|
b005cbe50e | ||
|
|
6c752d59ce | ||
|
|
dbdd0560bf | ||
|
|
aeacd9d8fd | ||
|
|
ded0bff23a | ||
|
|
80ab7caee9 | ||
|
|
516063310a | ||
|
|
c6d72aa781 | ||
|
|
91fa2a2859 | ||
|
|
13e84afcf0 | ||
|
|
88c160d3f8 | ||
|
|
ebd185f633 | ||
|
|
e86bffb720 | ||
|
|
fb65b63639 | ||
|
|
daf7e30ed1 | ||
|
|
dd62ecfbeb | ||
|
|
41cb8cd650 | ||
|
|
b7ad256986 | ||
|
|
f88ffa1893 | ||
|
|
6f604ca765 | ||
|
|
52c6eeae12 | ||
|
|
778f2897bc | ||
|
|
ca7bb77356 | ||
|
|
da8195b795 | ||
|
|
98129720bb | ||
|
|
3c1865c8a3 | ||
|
|
77ac728d47 | ||
|
|
1b5cfa3371 | ||
|
|
590e040958 | ||
|
|
2323d426dd | ||
|
|
9bcc80f2be | ||
|
|
bfde7518fb | ||
|
|
18d466e166 | ||
|
|
a30752d2e9 | ||
|
|
eb18537370 | ||
|
|
aa86445332 | ||
|
|
f1e7bfc377 | ||
|
|
34d524ef51 | ||
|
|
c914d38ff2 | ||
|
|
543b66a6cc | ||
|
|
c046930032 | ||
|
|
12264b6ec0 | ||
|
|
d4b7d77e10 | ||
|
|
7f6cc66eb1 |
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* @itdoginfo
|
||||
71
README.md
71
README.md
@@ -1,6 +1,15 @@
|
||||
Это альфа версия, может не работать. Обсуждение https://t.me/itdogchat - топик **Podkop**
|
||||
# Вещи, которые вам нужно знать перед установкой
|
||||
|
||||
Если у вас установлен Getdomains, то его следует удалить.
|
||||
- Это альфа версия, которая находится в активной разработке. Из версии в версию что-то может меняться.
|
||||
- Основной функционал работает, но побочные штуки сейчас могут сбоить.
|
||||
- При обновлении **обязатально** сбрасывайте кэш LuCI.
|
||||
- Также при обновлении всегда заходите в конфигурацию и проверяйте свои настройки. Конфигурация может измениться.
|
||||
- Необходимо минимум 15МБ свободного места на роутере. Роутерами с флешками на 16МБ сразу мимо.
|
||||
- При старте программы редактируется конфиг Dnsmasq.
|
||||
- Podkop редактирует конфиг sing-box. Обязательно сохраните ваш конфиг sing-box перед установкой, если он вам нужен.
|
||||
- Информация здесь может быть устаревшей. Все изменения фиксируются в телеграм-чате https://t.me/itdogchat - топик **Podkop**.
|
||||
- Если у вас не что-то не работает, то следуюет сходить в телеграм чат, прочитать закрепы и выполнить что там написано..
|
||||
- Если у вас установлен Getdomains, его следует удалить.
|
||||
|
||||
# Удаление GetDomains скриптом
|
||||
```
|
||||
@@ -11,9 +20,10 @@ sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/domain-routing-openwr
|
||||
|
||||
# Установка Podkop
|
||||
Пакет работает на всех архитектурах.
|
||||
Будет точно работать только на OpenWrt 23.05.
|
||||
Тестировался на **ванильной** OpenWrt 23.05 и OpenWrt 24.10.
|
||||
На FriendlyWrt 23.05 присуствуют зависимости от iptables, которые ломают tproxy. Если у вас появляется warning про это в логах, следуйте инструкции по приведённой там ссылке.
|
||||
|
||||
Нужен dnsmasq-full. В автоматическом режиме ставится сам. Вручную надо поставить [самостоятельно](https://github.com/itdoginfo/podkop/blob/952dd6215a2a83d65937cf9e33534c42809091ed/install.sh#L20).
|
||||
Поддержки APK на данный момент нет. APK будет сделан после того как разгребу основное.
|
||||
|
||||
## Автоматическая
|
||||
```
|
||||
@@ -36,7 +46,7 @@ sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/podkop/refs/heads/mai
|
||||
|
||||
# Удаление
|
||||
```
|
||||
opkg remove luci-app-podkop podkop
|
||||
opkg remove luci-i18n-podkop-ru luci-app-podkop podkop
|
||||
```
|
||||
|
||||
Если был установлен русский язык
|
||||
@@ -53,26 +63,20 @@ Luci: Services/podkop
|
||||
|
||||
### Proxy
|
||||
Для VLESS и Shadowsocks. Другие протоколы тоже будут, кидайте в чат примеры строк без чувствительных данных.
|
||||
Для использования этого режима нужен sing-box:
|
||||
```
|
||||
opkg update && opkg install sing-box
|
||||
```
|
||||
|
||||
В этом режиме просто копируйте строку в **Proxy String** и из неё автоматически настроится sing-box.
|
||||
|
||||
### VPN
|
||||
Здесь у вас должен быть уже настроен WG/OpenVPN/OpenConnect etc, создана Zone и Forwarding.
|
||||
Здесь у вас должен быть уже настроен WG/OpenVPN/OpenConnect etc, зона Zone и Forwarding не обязательны.
|
||||
|
||||
Просто выбрать интерфейс из списка.
|
||||
|
||||
## Настройка доменов и подсетей
|
||||
**Domain list enable** - Включить общий список.
|
||||
|
||||
**Delist domains from main list enable** - Выключение заданных доменов из общего списка. Задавать списком.
|
||||
**Community Lists** - Включить списки комьюнити
|
||||
|
||||
**Subnets list enable** - Включить подсети из общего списка, выбрать из предложенных.
|
||||
|
||||
**Custom domains enable** - Добавить свои домены. Задавать списком.
|
||||
**Custom domains enable** - Добавить свои домены
|
||||
|
||||
**Custom subnets enable** - Добавить подсети или IP-адреса. Для подсетей задать маску.
|
||||
|
||||
@@ -84,10 +88,24 @@ opkg update && opkg install sing-box
|
||||
- [x] awg работает не стабильно
|
||||
- [x] Сеть рестартится при любом раскладе
|
||||
- [x] Выкл-вкл wg через luci не отрабатывает поднятие маршрута
|
||||
- [ ] Проблема скачивания списка из github release. Нужен curl -L
|
||||
- [ ] Если eof после последней строки в rt_tables, то скрипт не добавляет перенос строки
|
||||
- [ ] Парсинг VLESS не отрабатывает, если в SNI два домена. Пример `sni=telegram.org%3Bwww.telegram.org`
|
||||
- [ ] `service network restart` ломает маршруты при sing-box
|
||||
- [ ] Совпадение секции с ruleset ломает конфиг sing-box
|
||||
- [ ] В каких-то случаях плохо отрабатывает localfile
|
||||
- [ ] exit 1 если в конфиге присуствует
|
||||
```
|
||||
option doh_backup_noresolv '0'
|
||||
list doh_backup_server ''
|
||||
list doh_backup_server ''
|
||||
list doh_server '127.0.0.1#5053'
|
||||
list doh_server '127.0.0.1#5054'
|
||||
```
|
||||
- [x] Только кастомный remote list не создаёт секцию в route-rules-rule-set и dns-rules-ruleset
|
||||
|
||||
# ToDo
|
||||
Этот раздел не означает задачи, которые нужно брать и делать. Это общий список хотелок. Если вы хотите помочь, пожалуйста, спросите сначала в телеграмме.
|
||||
|
||||
Сделано
|
||||
- [x] Скрипт для автоматической установки.
|
||||
- [x] Подсети дискорда.
|
||||
@@ -127,13 +145,22 @@ opkg update && opkg install sing-box
|
||||
- [x] Проверка места в скрипте install. Если доступно меньше 20MB - exit 1 c выводом колько надо и сколько доступно. + показ модели роутера
|
||||
- [ ] Правило запрещающее QUIC
|
||||
- [ ] Проверить обновление списков, отрабатывает ли
|
||||
- [ ] Проверка на ванильную openwrt
|
||||
- [ ] Проверка откуда установлен sing-box. Например, проверять установлен ли он из официального репозитория
|
||||
- [x] TG в сервисы
|
||||
- [ ] Выбор ткуда направлять трафик в туннель. В том числе чтоб откуда угодно, а не только br-lan
|
||||
- [ ] Диагностика: Proxy check completed successfully предположительно не показывает IP, если вернулся это IPv6.
|
||||
- [ ] Диагностика: podkop_domains: 0 elements как проверять что доходят запросы при fakeip? Мб врубать логи dnsmasq и их чекать.
|
||||
- [ ] Сделать галку запрещающую подкопу редачить dhcp. Допилить в исключение вместе с пустыми полями proxy и vpn
|
||||
- [ ] Валидации предустановленных значений. Если прописаны другие, то вывод в лог о неизвестной переменной и продолжение работы
|
||||
- [ ] Добавление в список доменов домены первого уровня (LuCI)
|
||||
- [ ] Проверка, что версия в makefile совпадает с тегом
|
||||
- [ ] Don't touch my DHCP!
|
||||
|
||||
Приоритет 2
|
||||
- [x] Списки доменов и подсетей с роутера
|
||||
- [ ] Кнопка обновления списка доменов и подсетей. Запихнуть в главное меню
|
||||
- [ ] IPv6
|
||||
- [ ] Придумать автонастройку DNS через stubby итд. Как лучше это реализовать. Для sing-box не нужно
|
||||
- [ ] Удаление подсетей CF из domain sets раз в N часов
|
||||
|
||||
Wiki
|
||||
- [x] Тема
|
||||
@@ -143,7 +170,7 @@ Wiki
|
||||
- [x] Переменная, раз во сколько часов обновлять списки
|
||||
- [ ] Галочка, которая режет доступ к doh серверам
|
||||
- [ ] Свой конфиг sing-box
|
||||
- [ ] Поменять curl на wget, убрать зависимость. Проверять доступность списков лучше всего curl`ом
|
||||
- [x] Поменять curl на wget, убрать зависимость. Проверять доступность списков лучше всего curl`ом
|
||||
|
||||
Рефактор
|
||||
- [ ] Handle для sing-box
|
||||
@@ -155,6 +182,14 @@ Wiki
|
||||
Хз как сделать
|
||||
- [ ] Добавить label от конфига vless\ss\etc в luci.
|
||||
|
||||
# Установка версии v0.2.5
|
||||
Удаляет полностью все пакеты podkop. Удаляет текущую конфигурацию podkop.
|
||||
После установки **обязательно** сбросьте кэш в LuCI.
|
||||
|
||||
```
|
||||
sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/podkop/refs/heads/main/install-v0.2.5.sh)
|
||||
```
|
||||
|
||||
# Разработка
|
||||
Есть два варианта:
|
||||
- Просто поставить пакет на роутер или виртуалку и прям редактировать через SFTP (opkg install openssh-sftp-server)
|
||||
|
||||
97
install-v0.2.5.sh
Executable file
97
install-v0.2.5.sh
Executable file
@@ -0,0 +1,97 @@
|
||||
#!/bin/sh
|
||||
|
||||
REPO="https://api.github.com/repos/itdoginfo/podkop/releases/tags/v0.2.5"
|
||||
|
||||
DOWNLOAD_DIR="/tmp/podkop"
|
||||
COUNT=3
|
||||
|
||||
rm -rf "$DOWNLOAD_DIR"
|
||||
mkdir -p "$DOWNLOAD_DIR"
|
||||
|
||||
main() {
|
||||
check_system
|
||||
|
||||
opkg update
|
||||
|
||||
if [ -f "/etc/init.d/podkop" ]; then
|
||||
echo "Remove current vesrion podkop"
|
||||
opkg remove luci-i18n-podkop-ru luci-app-podkop podkop
|
||||
rm /etc/config/podkop
|
||||
else
|
||||
echo "Installed podkop..."
|
||||
fi
|
||||
|
||||
wget -qO- "$REPO" | grep -o 'https://[^"[:space:]]*\.ipk' | while read -r url; do
|
||||
filename=$(basename "$url")
|
||||
filepath="$DOWNLOAD_DIR/$filename"
|
||||
|
||||
attempt=0
|
||||
while [ $attempt -lt $COUNT ]; do
|
||||
if [ -f "$filepath" ] && [ -s "$filepath" ]; then
|
||||
echo "$filename has already been uploaded"
|
||||
break
|
||||
fi
|
||||
|
||||
echo "Download $filename (count $((attempt+1)))..."
|
||||
wget -q -O "$filepath" "$url"
|
||||
|
||||
if [ -s "$filepath" ]; then
|
||||
echo "$filename successfully downloaded"
|
||||
else
|
||||
echo "Download error $filename. Retry..."
|
||||
rm -f "$filepath"
|
||||
fi
|
||||
attempt=$((attempt+1))
|
||||
done
|
||||
done
|
||||
|
||||
for pkg in podkop luci-app-podkop; do
|
||||
file=$(ls "$DOWNLOAD_DIR" | grep "^$pkg" | head -n 1)
|
||||
if [ -n "$file" ]; then
|
||||
echo "Installing $file"
|
||||
opkg install "$DOWNLOAD_DIR/$file"
|
||||
fi
|
||||
done
|
||||
|
||||
ru=$(ls "$DOWNLOAD_DIR" | grep "luci-i18n-podkop-ru" | head -n 1)
|
||||
if [ -n "$ru" ]; then
|
||||
printf "\033[32;1mРусский язык интерфейса ставим? y/n (Need a Russian translation?)\033[0m "
|
||||
while true; do
|
||||
read -r -p '' RUS
|
||||
case $RUS in
|
||||
y)
|
||||
opkg install "$DOWNLOAD_DIR/$ru"
|
||||
break
|
||||
;;
|
||||
n)
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Введите y или n"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
rm -f $DOWNLOAD_DIR/podkop*.ipk $DOWNLOAD_DIR/luci-app-podkop*.ipk $DOWNLOAD_DIR/luci-i18n-podkop-ru*.ipk
|
||||
|
||||
}
|
||||
|
||||
|
||||
check_system() {
|
||||
# Get router model
|
||||
MODEL=$(cat /tmp/sysinfo/model)
|
||||
echo "Router model: $MODEL"
|
||||
|
||||
if ! nslookup google.com >/dev/null 2>&1; then
|
||||
log "DNS not working"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if opkg list-installed | grep -qE "iptables|kmod-iptab"; then
|
||||
printf "\033[31;1mFound incompatible iptables packages. If you're using FriendlyWrt: https://t.me/itdogchat/44512/181082\033[0m\n"
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
||||
179
install.sh
179
install.sh
@@ -4,45 +4,21 @@ REPO="https://api.github.com/repos/itdoginfo/podkop/releases/latest"
|
||||
|
||||
IS_SHOULD_RESTART_NETWORK=
|
||||
DOWNLOAD_DIR="/tmp/podkop"
|
||||
COUNT=3
|
||||
|
||||
rm -rf "$DOWNLOAD_DIR"
|
||||
mkdir -p "$DOWNLOAD_DIR"
|
||||
|
||||
main() {
|
||||
check_system
|
||||
|
||||
wget -qO- "$REPO" | grep -o 'https://[^"]*\.ipk' | while read -r url; do
|
||||
filename=$(basename "$url")
|
||||
echo "Download $filename..."
|
||||
wget -q -O "$DOWNLOAD_DIR/$filename" "$url"
|
||||
done
|
||||
|
||||
echo "opkg update"
|
||||
opkg update
|
||||
|
||||
if opkg list-installed | grep -q dnsmasq-full; then
|
||||
echo "dnsmasq-full already installed"
|
||||
else
|
||||
echo "Installed dnsmasq-full"
|
||||
cd /tmp/ && opkg download dnsmasq-full
|
||||
opkg remove dnsmasq && opkg install dnsmasq-full --cache /tmp/
|
||||
|
||||
[ -f /etc/config/dhcp-opkg ] && cp /etc/config/dhcp /etc/config/dhcp-old && mv /etc/config/dhcp-opkg /etc/config/dhcp
|
||||
fi
|
||||
|
||||
openwrt_release=$(cat /etc/openwrt_release | grep -Eo [0-9]{2}[.][0-9]{2}[.][0-9]* | cut -d '.' -f 1 | tail -n 1)
|
||||
if [ $openwrt_release -ge 24 ]; then
|
||||
if uci get dhcp.@dnsmasq[0].confdir | grep -q /tmp/dnsmasq.d; then
|
||||
echo "confdir alreadt set"
|
||||
else
|
||||
printf "Setting confdir"
|
||||
uci set dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d'
|
||||
uci commit dhcp
|
||||
fi
|
||||
fi
|
||||
sing_box
|
||||
|
||||
opkg update
|
||||
|
||||
if [ -f "/etc/init.d/podkop" ]; then
|
||||
printf "\033[32;1mPodkop is already installed. Just upgrade it? (y/n)\033[0m\n"
|
||||
printf "\033[32;1my - Only upgrade podkop\033[0m\n"
|
||||
printf "\033[32;1mn - Upgrade and install proxy or tunnels\033[0m\n"
|
||||
printf "\033[32;1mn - Upgrade and install tunnels (WG, AWG, OpenVPN, OC)\033[0m\n"
|
||||
|
||||
while true; do
|
||||
read -r -p '' UPDATE
|
||||
@@ -67,29 +43,66 @@ main() {
|
||||
add_tunnel
|
||||
fi
|
||||
|
||||
opkg install $DOWNLOAD_DIR/podkop*.ipk
|
||||
opkg install $DOWNLOAD_DIR/luci-app-podkop*.ipk
|
||||
|
||||
echo "Русский язык интерфейса ставим? y/n (Need a Russian translation?)"
|
||||
while true; do
|
||||
read -r -p '' RUS
|
||||
case $RUS in
|
||||
y)
|
||||
opkg install $DOWNLOAD_DIR/luci-i18n-podkop-ru*.ipk
|
||||
break
|
||||
;;
|
||||
|
||||
n)
|
||||
break
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Please enter y or n"
|
||||
;;
|
||||
esac
|
||||
download_success=0
|
||||
while read -r url; do
|
||||
filename=$(basename "$url")
|
||||
filepath="$DOWNLOAD_DIR/$filename"
|
||||
|
||||
attempt=0
|
||||
while [ $attempt -lt $COUNT ]; do
|
||||
echo "Download $filename (count $((attempt+1)))..."
|
||||
if wget -q -O "$filepath" "$url"; then
|
||||
if [ -s "$filepath" ]; then
|
||||
echo "$filename successfully downloaded"
|
||||
download_success=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
echo "Download error $filename. Retry..."
|
||||
rm -f "$filepath"
|
||||
attempt=$((attempt+1))
|
||||
done
|
||||
|
||||
if [ $attempt -eq $COUNT ]; then
|
||||
echo "Failed to download $filename after $COUNT attempts"
|
||||
fi
|
||||
done < <(wget -qO- "$REPO" | grep -o 'https://[^"[:space:]]*\.ipk')
|
||||
|
||||
if [ $download_success -eq 0 ]; then
|
||||
echo "No packages were downloaded successfully"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for pkg in podkop luci-app-podkop; do
|
||||
file=$(ls "$DOWNLOAD_DIR" | grep "^$pkg" | head -n 1)
|
||||
if [ -n "$file" ]; then
|
||||
echo "Installing $file"
|
||||
opkg install "$DOWNLOAD_DIR/$file"
|
||||
sleep 3
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f $DOWNLOAD_DIR/podkop*.ipk $DOWNLOAD_DIR/luci-app-podkop*.ipk $DOWNLOAD_DIR/luci-i18n-podkop-ru*.ipk
|
||||
ru=$(ls "$DOWNLOAD_DIR" | grep "luci-i18n-podkop-ru" | head -n 1)
|
||||
if [ -n "$ru" ]; then
|
||||
printf "\033[32;1mРусский язык интерфейса ставим? y/n (Need a Russian translation?)\033[0m "
|
||||
while true; do
|
||||
read -r -p '' RUS
|
||||
case $RUS in
|
||||
y)
|
||||
opkg install "$DOWNLOAD_DIR/$ru"
|
||||
break
|
||||
;;
|
||||
n)
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Введите y или n"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
find "$DOWNLOAD_DIR" -type f -name '*podkop*' -exec rm {} \;
|
||||
|
||||
if [ "$IS_SHOULD_RESTART_NETWORK" ]; then
|
||||
printf "\033[32;1mRestart network\033[0m\n"
|
||||
@@ -98,24 +111,18 @@ main() {
|
||||
}
|
||||
|
||||
add_tunnel() {
|
||||
echo "What type of VPN or proxy will be used? We also can automatically configure Wireguard and Amnezia WireGuard."
|
||||
echo "1) VLESS, Shadowsocks (A sing-box will be installed)"
|
||||
echo "2) Wireguard"
|
||||
echo "3) AmneziaWG"
|
||||
echo "4) OpenVPN"
|
||||
echo "5) OpenConnect"
|
||||
echo "6) Skip this step"
|
||||
printf "\033[32;1mWill you be using Wireguard, AmneziaWG, OpenVPN, OpenConnect? If yes, select a number and they will be automatically installed\033[0m "
|
||||
echo "1) Wireguard"
|
||||
echo "2) AmneziaWG"
|
||||
echo "3) OpenVPN"
|
||||
echo "4) OpenConnect"
|
||||
echo "5) I use VLESS/SS. Skip this step"
|
||||
|
||||
while true; do
|
||||
read -r -p '' TUNNEL
|
||||
case $TUNNEL in
|
||||
|
||||
1)
|
||||
opkg install sing-box
|
||||
break
|
||||
;;
|
||||
|
||||
2)
|
||||
opkg install wireguard-tools luci-proto-wireguard luci-app-wireguard
|
||||
|
||||
printf "\033[32;1mDo you want to configure the wireguard interface? (y/n): \033[0m\n"
|
||||
@@ -130,7 +137,7 @@ add_tunnel() {
|
||||
break
|
||||
;;
|
||||
|
||||
3)
|
||||
2)
|
||||
install_awg_packages
|
||||
|
||||
printf "\033[32;1mThere are no instructions for manual configure yet. Do you want to configure the amneziawg interface? (y/n): \033[0m\n"
|
||||
@@ -143,20 +150,20 @@ add_tunnel() {
|
||||
break
|
||||
;;
|
||||
|
||||
4)
|
||||
3)
|
||||
opkg install opkg install openvpn-openssl luci-app-openvpn
|
||||
printf "\e[1;32mUse these instructions to configure https://itdog.info/nastrojka-klienta-openvpn-na-openwrt/\e[0m\n"
|
||||
break
|
||||
;;
|
||||
|
||||
5)
|
||||
4)
|
||||
opkg install opkg install openconnect luci-proto-openconnect
|
||||
printf "\e[1;32mUse these instructions to configure https://itdog.info/nastrojka-klienta-openconnect-na-openwrt/\e[0m\n"
|
||||
break
|
||||
;;
|
||||
|
||||
6)
|
||||
echo "Skip. Use this if you're installing an upgrade."
|
||||
5)
|
||||
echo "Installation without additional dependencies."
|
||||
break
|
||||
;;
|
||||
|
||||
@@ -394,19 +401,37 @@ check_system() {
|
||||
echo "Router model: $MODEL"
|
||||
|
||||
# Check available space
|
||||
AVAILABLE_SPACE=$(df /tmp | awk 'NR==2 {print $4}')
|
||||
# Change after switch sing-box
|
||||
REQUIRED_SPACE=1024 # 20MB in KB
|
||||
|
||||
echo "Available space: $((AVAILABLE_SPACE/1024))MB"
|
||||
echo "Required space: $((REQUIRED_SPACE/1024))MB"
|
||||
AVAILABLE_SPACE=$(df /overlay | awk 'NR==2 {print $4}')
|
||||
REQUIRED_SPACE=15360 # 15MB in KB
|
||||
|
||||
if [ "$AVAILABLE_SPACE" -lt "$REQUIRED_SPACE" ]; then
|
||||
echo "Error: Insufficient space in /tmp"
|
||||
printf "\033[31;1mError: Insufficient space in flash\033[0m\n"
|
||||
echo "Available: $((AVAILABLE_SPACE/1024))MB"
|
||||
echo "Required: $((REQUIRED_SPACE/1024))MB"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! nslookup google.com >/dev/null 2>&1; then
|
||||
log "DNS not working"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if opkg list-installed | grep -qE "iptables|kmod-iptab"; then
|
||||
printf "\033[31;1mFound incompatible iptables packages. If you're using FriendlyWrt: https://t.me/itdogchat/44512/181082\033[0m\n"
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
||||
sing_box() {
|
||||
if ! opkg list-installed | grep -q "^sing-box"; then
|
||||
return
|
||||
fi
|
||||
|
||||
sing_box_version=$(sing-box version | head -n 1 | awk '{print $3}')
|
||||
required_version="1.11.1"
|
||||
|
||||
if [ "$(echo -e "$sing_box_version\n$required_version" | sort -V | head -n 1)" != "$required_version" ]; then
|
||||
opkg remove sing-box
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-podkop
|
||||
PKG_VERSION:=0.2.5
|
||||
PKG_VERSION:=0.3.10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LUCI_TITLE:=LuCI podkop app
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -329,4 +329,152 @@ msgid "View Logs"
|
||||
msgstr "Просмотр логов"
|
||||
|
||||
msgid "Failed to copy logs: "
|
||||
msgstr "Ошибка копирования логов: "
|
||||
msgstr "Ошибка копирования логов: "
|
||||
|
||||
msgid "Show Config"
|
||||
msgstr "Показать конфигурацию"
|
||||
|
||||
msgid "Show current podkop configuration with masked sensitive data"
|
||||
msgstr "Показать текущую конфигурацию podkop с маскированными конфиденциальными данными"
|
||||
|
||||
msgid "Podkop Configuration"
|
||||
msgstr "Конфигурация Podkop"
|
||||
|
||||
msgid "Update lists"
|
||||
msgstr "Обновить списки"
|
||||
|
||||
msgid "Update all lists in config"
|
||||
msgstr "Обновить все списки в конфигурации"
|
||||
|
||||
msgid "List Update"
|
||||
msgstr "Обновление списков"
|
||||
|
||||
msgid "Lists will be updated in background. You can check the progress in system logs."
|
||||
msgstr "Списки будут обновлены в фоновом режиме. Вы можете проверить прогресс в системных логах."
|
||||
|
||||
msgid "Extra configurations"
|
||||
msgstr "Дополнительные конфигурации"
|
||||
|
||||
msgid "Extra configuration"
|
||||
msgstr "Дополнительная конфигурация"
|
||||
|
||||
msgid "Add Section"
|
||||
msgstr "Добавить раздел"
|
||||
|
||||
msgid "QUIC disable"
|
||||
msgstr "Отключить QUIC"
|
||||
|
||||
msgid "For issues with the video stream"
|
||||
msgstr "Для проблем с видеопотоком"
|
||||
|
||||
msgid "Community Lists"
|
||||
msgstr "Списки сообщества"
|
||||
|
||||
msgid "Local Domain Lists"
|
||||
msgstr "Локальные списки доменов"
|
||||
|
||||
msgid "Use the list from the router filesystem"
|
||||
msgstr "Использовать список из файловой системы роутера"
|
||||
|
||||
msgid "Local Domain Lists Path"
|
||||
msgstr "Путь к локальным спискам доменов"
|
||||
|
||||
msgid "Enter to the list file path"
|
||||
msgstr "Введите путь к файлу списка"
|
||||
|
||||
msgid "Proxy Check"
|
||||
msgstr "Проверка прокси"
|
||||
|
||||
msgid "Check if sing-box proxy works correctly"
|
||||
msgstr "Проверить корректность работы прокси sing-box"
|
||||
|
||||
msgid "Check Proxy"
|
||||
msgstr "Проверить прокси"
|
||||
|
||||
msgid "Proxy Check Results"
|
||||
msgstr "Результаты проверки прокси"
|
||||
|
||||
msgid "NFT Rules"
|
||||
msgstr "Правила NFT"
|
||||
|
||||
msgid "Show current nftables rules and statistics"
|
||||
msgstr "Показать текущие правила и статистику nftables"
|
||||
|
||||
msgid "Check Rules"
|
||||
msgstr "Проверить правила"
|
||||
|
||||
msgid "GitHub Connectivity"
|
||||
msgstr "Подключение к GitHub"
|
||||
|
||||
msgid "Check GitHub connectivity and lists availability"
|
||||
msgstr "Проверить подключение к GitHub и доступность списков"
|
||||
|
||||
msgid "Check GitHub"
|
||||
msgstr "Проверить GitHub"
|
||||
|
||||
msgid "GitHub Connectivity Results"
|
||||
msgstr "Результаты проверки подключения к GitHub"
|
||||
|
||||
msgid "Sing-Box Logs"
|
||||
msgstr "Логи Sing-Box"
|
||||
|
||||
msgid "View recent sing-box logs from system journal"
|
||||
msgstr "Просмотр последних логов sing-box из системного журнала"
|
||||
|
||||
msgid "View Sing-Box Logs"
|
||||
msgstr "Просмотр логов Sing-Box"
|
||||
|
||||
msgid "Podkop Logs"
|
||||
msgstr "Логи Podkop"
|
||||
|
||||
msgid "View recent podkop logs from system journal"
|
||||
msgstr "Просмотр последних логов podkop из системного журнала"
|
||||
|
||||
msgid "View Podkop Logs"
|
||||
msgstr "Просмотр логов Podkop"
|
||||
|
||||
msgid "Active Connections"
|
||||
msgstr "Активные соединения"
|
||||
|
||||
msgid "View active sing-box network connections"
|
||||
msgstr "Просмотр активных сетевых соединений sing-box"
|
||||
|
||||
msgid "Check Connections"
|
||||
msgstr "Проверить соединения"
|
||||
|
||||
msgid "DNSMasq Configuration"
|
||||
msgstr "Конфигурация DNSMasq"
|
||||
|
||||
msgid "View current DNSMasq configuration settings"
|
||||
msgstr "Просмотр текущих настроек конфигурации DNSMasq"
|
||||
|
||||
msgid "Check DNSMasq"
|
||||
msgstr "Проверить DNSMasq"
|
||||
|
||||
msgid "Sing-Box Configuration"
|
||||
msgstr "Конфигурация Sing-Box"
|
||||
|
||||
msgid "Show current sing-box configuration"
|
||||
msgstr "Показать текущую конфигурацию sing-box"
|
||||
|
||||
msgid "Show Sing-Box Config"
|
||||
msgstr "Показать конфигурацию Sing-Box"
|
||||
|
||||
msgid "Lists Update Results"
|
||||
msgstr "Результаты обновления списков"
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Warning: %s cannot be used together with %s. Previous selections have been removed."
|
||||
msgstr "Предупреждение: %s нельзя использовать вместе с %s. Предыдущие варианты были удалены."
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Warning: Russia inside can only be used with Meta, Twitter, Discord, and Telegram. %s have been removed from selection."
|
||||
msgstr "Внимание: Russia inside может использоваться только с Meta, Twitter, Discord и Telegram. %s были удалены из выбора."
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Regional options cannot be used together"
|
||||
msgstr "Нельзя использовать несколько региональных опций"
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Russia inside restrictions"
|
||||
msgstr "Ограничения Russia inside"
|
||||
@@ -329,4 +329,152 @@ msgid "View Logs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Failed to copy logs: "
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Config"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show current podkop configuration with masked sensitive data"
|
||||
msgstr ""
|
||||
|
||||
msgid "Podkop Configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Update lists"
|
||||
msgstr ""
|
||||
|
||||
msgid "Update all lists in config"
|
||||
msgstr ""
|
||||
|
||||
msgid "List Update"
|
||||
msgstr ""
|
||||
|
||||
msgid "Lists will be updated in background. You can check the progress in system logs."
|
||||
msgstr ""
|
||||
|
||||
msgid "Extra configurations"
|
||||
msgstr ""
|
||||
|
||||
msgid "Extra configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add Section"
|
||||
msgstr ""
|
||||
|
||||
msgid "QUIC disable"
|
||||
msgstr ""
|
||||
|
||||
msgid "For issues with the video stream"
|
||||
msgstr ""
|
||||
|
||||
msgid "Community Lists"
|
||||
msgstr ""
|
||||
|
||||
msgid "Local Domain Lists"
|
||||
msgstr ""
|
||||
|
||||
msgid "Use the list from the router filesystem"
|
||||
msgstr ""
|
||||
|
||||
msgid "Local Domain Lists Path"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter to the list file path"
|
||||
msgstr ""
|
||||
|
||||
msgid "Proxy Check"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check if sing-box proxy works correctly"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check Proxy"
|
||||
msgstr ""
|
||||
|
||||
msgid "Proxy Check Results"
|
||||
msgstr ""
|
||||
|
||||
msgid "NFT Rules"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show current nftables rules and statistics"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check Rules"
|
||||
msgstr ""
|
||||
|
||||
msgid "GitHub Connectivity"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check GitHub connectivity and lists availability"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check GitHub"
|
||||
msgstr ""
|
||||
|
||||
msgid "GitHub Connectivity Results"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sing-Box Logs"
|
||||
msgstr ""
|
||||
|
||||
msgid "View recent sing-box logs from system journal"
|
||||
msgstr ""
|
||||
|
||||
msgid "View Sing-Box Logs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Podkop Logs"
|
||||
msgstr ""
|
||||
|
||||
msgid "View recent podkop logs from system journal"
|
||||
msgstr ""
|
||||
|
||||
msgid "View Podkop Logs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Active Connections"
|
||||
msgstr ""
|
||||
|
||||
msgid "View active sing-box network connections"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check Connections"
|
||||
msgstr ""
|
||||
|
||||
msgid "DNSMasq Configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "View current DNSMasq configuration settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Check DNSMasq"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sing-Box Configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show current sing-box configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show Sing-Box Config"
|
||||
msgstr ""
|
||||
|
||||
msgid "Lists Update Results"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Warning: %s cannot be used together with %s. Previous selections have been removed."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Warning: Russia inside can only be used with Meta, Twitter, Discord, and Telegram. %s have been removed from selection."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Regional options cannot be used together"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:XXX
|
||||
msgid "Russia inside restrictions"
|
||||
msgstr ""
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=podkop
|
||||
PKG_VERSION:=0.2.5
|
||||
PKG_VERSION:=0.3.10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
||||
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/podkop
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+dnsmasq-full +curl +jq +kmod-nft-tproxy +coreutils-base64
|
||||
DEPENDS:=+sing-box +curl +jq +kmod-nft-tproxy +coreutils-base64
|
||||
TITLE:=Domain routing app
|
||||
URL:=https://itdog.info
|
||||
PKGARCH:=all
|
||||
@@ -33,7 +33,7 @@ define Package/podkop/prerm
|
||||
|
||||
grep -q "105 podkop" /etc/iproute2/rt_tables && sed -i "/105 podkop/d" /etc/iproute2/rt_tables
|
||||
|
||||
rm -f /etc/hotplug.d/iface/50-podkop
|
||||
/etc/init.d/podkop stop
|
||||
|
||||
exit 0
|
||||
endef
|
||||
@@ -49,9 +49,6 @@ define Package/podkop/install
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/etc/config/podkop $(1)/etc/config/podkop
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_DATA) ./files/etc/hotplug.d/iface/50-podkop $(1)/etc/hotplug.d/iface/50-podkop
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,podkop))
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
config main 'main'
|
||||
option mode ''
|
||||
option interface ''
|
||||
option mode 'proxy'
|
||||
#option interface ''
|
||||
option proxy_config_type ''
|
||||
#option outbound_json ''
|
||||
#option proxy_string ''
|
||||
option proxy_string ''
|
||||
option domain_list_enabled '1'
|
||||
option domain_list 'ru_inside'
|
||||
option domain_list 'russia_inside'
|
||||
option subnets_list_enabled '0'
|
||||
#list subnets 'twitter'
|
||||
option custom_domains_list_type 'disable'
|
||||
#list custom_domains ''
|
||||
#option custom_domains_text ''
|
||||
@@ -29,21 +28,6 @@ config main 'main'
|
||||
option yacd '0'
|
||||
option socks5 '0'
|
||||
option exclude_ntp '0'
|
||||
option update_interval ''
|
||||
option custom_domains_text
|
||||
|
||||
config second 'second'
|
||||
option second_enable '0'
|
||||
option second_mode 'proxy'
|
||||
option second_interface ''
|
||||
option second_proxy_config_type ''
|
||||
#option second_outbound_json ''
|
||||
#option second_proxy_string ''
|
||||
option second_domain_service_enabled '0'
|
||||
#list second_service_list 'youtube'
|
||||
option second_custom_domains_type 'disable'
|
||||
#list second_custom_domains 'ifconfig.io'
|
||||
#option second_custom_domains_text ''
|
||||
option second_custom_subnets_type 'disable'
|
||||
#list second_custom_subnets ''
|
||||
#porion second_custom_subnets_text ''
|
||||
option quic_disable '0'
|
||||
option update_interval '1d'
|
||||
option custom_domains_text
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
config_load "/etc/config/podkop"
|
||||
. /etc/init.d/podkop
|
||||
|
||||
config_get "interface" "main" "interface" "0"
|
||||
config_get "mode" "main" "mode" "0"
|
||||
if [ "$mode" = "vpn" ] && [ -n "$interface" ]; then
|
||||
add_route_interface "$interface" "podkop"
|
||||
fi
|
||||
|
||||
if [ "$mode" = "proxy" ]; then
|
||||
echo "Add route for main tproxy"
|
||||
add_route_tproxy podkop
|
||||
fi
|
||||
|
||||
config_get second_enable "second" "second_enable" "0"
|
||||
config_get second_interface "second" "second_interface" "0"
|
||||
config_get "second_mode" "second" "second_mode" "0"
|
||||
if [ "$second_enable" -eq "1" ] && [ "$second_mode" = "vpn" ] && [ -n "$second_interface" ]; then
|
||||
add_route_interface "$second_interface" "podkop2"
|
||||
fi
|
||||
|
||||
if [ "$second_enable" -eq "1" ] && [ "$second_mode" = "proxy" ]; then
|
||||
echo "Add route for second tproxy"
|
||||
add_route_tproxy podkop2
|
||||
fi
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user