mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-08 12:36:50 +03:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f90ab7f468 | ||
|
|
e4bfd447ce | ||
|
|
fbdd759b83 | ||
|
|
2488bc30b1 | ||
|
|
dcc12cf920 | ||
|
|
c99cef9f27 | ||
|
|
8a68f3fcc2 | ||
|
|
ed2994be3a | ||
|
|
77ff5ab781 | ||
|
|
1c80bc5a5e | ||
|
|
f688d74c32 | ||
|
|
7bc50d58d3 | ||
|
|
77ce0c380b | ||
|
|
47d1b349c7 | ||
|
|
e9face1f4a | ||
|
|
e5bf7d9bed | ||
|
|
dd4722f3e1 | ||
|
|
1e945dafe7 | ||
|
|
b080521a58 | ||
|
|
6a96a85773 | ||
|
|
6fb3a36974 | ||
|
|
b3dbee1dbe | ||
|
|
916321578d | ||
|
|
c74d733717 | ||
|
|
433724f762 | ||
|
|
6378aa9910 | ||
|
|
68f5f123ca | ||
|
|
fae43d0471 | ||
|
|
9d6dc45fdb | ||
|
|
9aa5a2d242 | ||
|
|
63dc86fca4 | ||
|
|
4d9cedaf4c | ||
|
|
14e7cbae01 | ||
|
|
c9f610bb1e | ||
|
|
19671c7f67 | ||
|
|
6d1e4091e5 | ||
|
|
96d661c49f | ||
|
|
da8dd06b34 | ||
|
|
2c1bcffb6d |
200
README.md
200
README.md
@@ -1,191 +1,59 @@
|
|||||||
# Вещи, которые вам нужно знать перед установкой
|
# Вещи, которые вам нужно знать перед установкой
|
||||||
|
|
||||||
- Это альфа версия, которая находится в активной разработке. Из версии в версию что-то может меняться.
|
- Это бета-версия, которая находится в активной разработке. Из версии в версию что-то может меняться.
|
||||||
- Основной функционал работает, но побочные штуки сейчас могут сбоить.
|
- При возникновении проблем, нужен технически грамотный фидбэк в чат.
|
||||||
- При обновлении **обязательно** сбрасывайте кэш LuCI.
|
- При обновлении **обязательно** [сбрасывайте кэш LuCI](https://podkop.net/docs/clearbrowsercache/).
|
||||||
- Также при обновлении всегда заходите в конфигурацию и проверяйте свои настройки. Конфигурация может измениться.
|
- Также при обновлении всегда заходите в конфигурацию и проверяйте свои настройки. Конфигурация может измениться.
|
||||||
- Необходимо минимум 15МБ свободного места на роутере. Роутерами с флешками на 16МБ сразу мимо.
|
- Необходимо минимум 15МБ свободного места на роутере. Роутеры с флешками на 16МБ сразу мимо.
|
||||||
- При старте программы редактируется конфиг Dnsmasq.
|
- При старте программы редактируется конфиг Dnsmasq.
|
||||||
- Podkop редактирует конфиг sing-box. Обязательно сохраните ваш конфиг sing-box перед установкой, если он вам нужен.
|
- Podkop редактирует конфиг sing-box. Обязательно сохраните ваш конфиг sing-box перед установкой, если он вам нужен.
|
||||||
- Информация здесь может быть устаревшей. Все изменения фиксируются в телеграм-чате https://t.me/itdogchat - топик **Podkop**.
|
- Информация здесь может быть устаревшей. Все изменения фиксируются в [телеграм-чате](https://t.me/itdogchat/81758/420321).
|
||||||
- Если у вас не что-то не работает, то следуюет сходить в телеграм чат, прочитать закрепы и выполнить что там написано..
|
- [Если у вас не что-то не работает.](https://podkop.net/docs/diagnostics/)
|
||||||
- Если у вас установлен Getdomains, его следует удалить.
|
- Если у вас установлен Getdomains, [его следует удалить](https://github.com/itdoginfo/domain-routing-openwrt?tab=readme-ov-file#%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82-%D0%B4%D0%BB%D1%8F-%D1%83%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F).
|
||||||
|
|
||||||
# Удаление GetDomains скриптом
|
# Документация
|
||||||
```
|
https://podkop.net/
|
||||||
sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/domain-routing-openwrt/refs/heads/master/getdomains-uninstall.sh)
|
|
||||||
```
|
|
||||||
|
|
||||||
Оставляет туннели, зоны, forwarding. А также stubby и dnscrypt. Они не помешают. Конфиг sing-box будет перезаписан в podkop.
|
|
||||||
|
|
||||||
# Установка Podkop
|
# Установка Podkop
|
||||||
Пакет работает на всех архитектурах.
|
Полная информация в [документации](https://podkop.net/docs/install/)
|
||||||
Тестировался на **ванильной** OpenWrt 23.05 и OpenWrt 24.10.
|
|
||||||
На FriendlyWrt 23.05 присуствуют зависимости от iptables, которые ломают tproxy. Если у вас появляется warning про это в логах, следуйте инструкции по приведённой там ссылке.
|
|
||||||
|
|
||||||
Поддержки APK на данный момент нет. APK будет сделан после того как разгребу основное.
|
Вкратце, достаточно одного скрипта для установки:
|
||||||
|
|
||||||
## Автоматическая
|
|
||||||
```
|
```
|
||||||
sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/podkop/refs/heads/main/install.sh)
|
sh <(wget -O - https://raw.githubusercontent.com/itdoginfo/podkop/refs/heads/main/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
Скрипт также предложит выбрать, какой туннель будет использоваться. Для выбранного туннеля будут установлены нужные пакеты, а для Wireguard и AmneziaWG также будет предложена автоматическая настройка - прямо в консоли скрипт запросит данные конфига. Для AmneziaWG можно также выбрать вариант с использованием конфига обычного Wireguard и автоматической обфускацией до AmneziaWG.
|
Для обновления:
|
||||||
|
|
||||||
Для AmneziaWG скрипт проверяет наличие пакетов под вашу платформу в [стороннем репозитории](https://github.com/Slava-Shchipunov/awg-openwrt/releases), так как в официальном репозитории OpenWRT они отсутствуют, и автоматически их устанавливает.
|
|
||||||
|
|
||||||
## Вручную
|
|
||||||
Сделать `opkg update`, чтоб установились зависимости.
|
|
||||||
Скачать пакеты `podkop_*.ipk` и `luci-app-podkop_*.ipk` из релиза. `opkg install` сначала первый, потом второй.
|
|
||||||
|
|
||||||
# Обновление
|
|
||||||
Та же самая команда, что для установки. Но с флагом **upgrade** сразу передёт к обновлению.
|
|
||||||
```
|
```
|
||||||
sh <(wget -qO- https://raw.githubusercontent.com/itdoginfo/podkop/refs/heads/main/install.sh) --upgrade
|
sh <(wget -qO- https://raw.githubusercontent.com/itdoginfo/podkop/refs/heads/main/install.sh) --upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
# Удаление
|
|
||||||
```
|
|
||||||
opkg remove luci-i18n-podkop-ru luci-app-podkop podkop
|
|
||||||
```
|
|
||||||
|
|
||||||
# Использование
|
|
||||||
Конфиг: /etc/config/podkop
|
|
||||||
|
|
||||||
Luci: Services/podkop
|
|
||||||
|
|
||||||
## Режимы
|
|
||||||
|
|
||||||
### Proxy
|
|
||||||
Для VLESS и Shadowsocks. Другие протоколы тоже будут, кидайте в чат примеры строк без чувствительных данных.
|
|
||||||
|
|
||||||
В этом режиме просто копируйте строку в **Proxy String** и из неё автоматически настроится sing-box.
|
|
||||||
|
|
||||||
### VPN
|
|
||||||
Здесь у вас должен быть уже настроен WG/OpenVPN/OpenConnect etc, зона Zone и Forwarding не обязательны.
|
|
||||||
|
|
||||||
Просто выбрать интерфейс из списка.
|
|
||||||
|
|
||||||
## Настройка доменов и подсетей
|
|
||||||
**Community Lists** - Включить списки комьюнити
|
|
||||||
|
|
||||||
**Custom domains enable** - Добавить свои домены
|
|
||||||
|
|
||||||
**Custom subnets enable** - Добавить подсети или IP-адреса. Для подсетей задать маску.
|
|
||||||
|
|
||||||
# ToDo
|
# ToDo
|
||||||
Этот раздел не означает задачи, которые нужно брать и делать. Это общий список хотелок. Если вы хотите помочь, пожалуйста, спросите сначала в телеграмме.
|
Этот раздел не означает задачи, которые нужно брать и делать. Это общий список хотелок. Если вы хотите помочь, пожалуйста, спросите сначала в телеграмме.
|
||||||
|
|
||||||
Основные задачи в issues.
|
Основные задачи в issues.
|
||||||
|
|
||||||
Низкий приоритет
|
## Рефактор
|
||||||
- [ ] Галочка, которая режет доступ к doh серверам
|
- [ ] Очевидные повторения в `/usr/bin/podkop` загнать в переменые
|
||||||
- [ ] IPv6. Только после наполнения Wiki
|
- [ ] Возможно поменять структуру
|
||||||
|
|
||||||
Рефактор
|
## Списки
|
||||||
- [ ] Handle для sing-box
|
- [ ] Speedtest
|
||||||
- [ ] Handle для dnsmasq
|
- [x] Google AI
|
||||||
|
- [x] Google PlayMarket. Здесь уточнить, что точно не работает через корректную настройку FakeIP, а не dnsmasq+nft.
|
||||||
|
- [x] Hetzner ASN (AS24940)
|
||||||
|
- [x] OVH ASN (AS16276)
|
||||||
|
|
||||||
|
## Будущее
|
||||||
|
- [ ] После наполнения вики про туннели, убрать всё что связано с их установкой из скрипта. Только с AWG что-то решить, лучше чтоб был скрипт в сторонем репозитории.
|
||||||
|
- [ ] Подписка. Здесь нужна реализация, чтоб для каждой секции помимо ручного выбора, был выбор фильтрации по тегу. Например, для main выбираем ключевые слова NL, DE, FI. А для extra секции фильтруем по RU. И создаётся outbound c urltest в которых перечислены outbound из фильтров.
|
||||||
|
- [ ] Опция, когда все запросы (с роутера в первую очередь), а не только br-lan идут в прокси. С этим связана #95. Требуется много переделать для nftables.
|
||||||
|
- [ ] Весь трафик в Proxy\VPN. Вопрос, что делать с экстрасекциями в этом случае. FakeIP здесь скорее не нужен, а значит только main секция остаётся. Всё что касается fakeip проверок, придётся выключать в этом режиме.
|
||||||
|
- [ ] Поддержка Source format. Нужна расшифровка в json и если присуствуют подсети, заносить их в custom subnet nftset.
|
||||||
|
- [ ] Переделывание функции формирования кастомных списков в JSON. Обрабатывать сразу скопом, а не по одному.
|
||||||
|
- [ ] При успешном запуске переходит в фоновый режим и следит за состоянием sing-box. Если вдруг идёт exit 1, выполняется dnsmasq restore и снова следит за состоянием. Вопрос в том, как это искусcтвенно провернуть. Попробовать положить прокси и посмотреть, останется ли работать DNS в этом случае. И здесь, вероятно, можно обойтись триггером в init.d.
|
||||||
|
- [ ] Галочка, которая режет доступ к doh серверам.
|
||||||
|
- [ ] IPv6. Только после наполнения Wiki.
|
||||||
|
|
||||||
|
## Тесты
|
||||||
- [ ] Unit тесты (BATS)
|
- [ ] Unit тесты (BATS)
|
||||||
- [ ] Интеграционые тесты бекенда (OpenWrt rootfs + BATS)
|
- [ ] Интеграционые тесты бекенда (OpenWrt rootfs + BATS)
|
||||||
|
|
||||||
# Don't touch my dhcp
|
|
||||||
Нужно в первую очередь, чтоб использовать опцию `server`.
|
|
||||||
|
|
||||||
В случае если опция активна, podkop не трогает /etc/config/dhcp. И вам требуется самостоятельно указать следующие значения:
|
|
||||||
```
|
|
||||||
option noresolv '1'
|
|
||||||
option cachesize '0'
|
|
||||||
list server '127.0.0.42'
|
|
||||||
```
|
|
||||||
Без этого podkop работать не будет.
|
|
||||||
|
|
||||||
Если нужно до определённых доменов ходить через определённый DNS-сервер, то конфиг выглядит так
|
|
||||||
```
|
|
||||||
option noresolv '1'
|
|
||||||
option cachesize '0'
|
|
||||||
list server '/itdog.info/1.1.1.1'
|
|
||||||
list server '127.0.0.42'
|
|
||||||
```
|
|
||||||
|
|
||||||
В этом случае домен и все субдомены ресурса itdog.info будут резолвится через DNS-сервер 1.1.1.1
|
|
||||||
|
|
||||||
# Bad WAN
|
|
||||||
При использовании опции **Interface monitoring** необходимо рестартовать podkop, чтоб init.d подхватил это
|
|
||||||
```
|
|
||||||
service podkop restart
|
|
||||||
```
|
|
||||||
|
|
||||||
# Разработка
|
|
||||||
Есть два варианта:
|
|
||||||
- Просто поставить пакет на роутер или виртуалку и прям редактировать через SFTP (opkg install openssh-sftp-server)
|
|
||||||
- SDK, чтоб собирать пакеты
|
|
||||||
|
|
||||||
Для сборки пакетов нужен SDK, один из вариантов скачать прям файл и разархивировать
|
|
||||||
https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/
|
|
||||||
Нужен файл с SDK в имени
|
|
||||||
|
|
||||||
```
|
|
||||||
wget https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz
|
|
||||||
tar xf openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz
|
|
||||||
mv openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64 SDK
|
|
||||||
```
|
|
||||||
Последнее для удобства.
|
|
||||||
|
|
||||||
Создаём директорию для пакета
|
|
||||||
```
|
|
||||||
mkdir package/utilites
|
|
||||||
```
|
|
||||||
|
|
||||||
Симлинк из репозитория
|
|
||||||
```
|
|
||||||
ln -s ~/podkop/podkop package/utilites/podkop
|
|
||||||
ln -s ~/podkop/luci-app-podkop package/luci-app-podkop
|
|
||||||
```
|
|
||||||
|
|
||||||
В первый раз для сборки luci-app необходимо обновить пакеты
|
|
||||||
```
|
|
||||||
./scripts/feeds update -a
|
|
||||||
```
|
|
||||||
|
|
||||||
Для make можно добавить флаг -j N, где N - количество ядер для сборки. Первый раз пройдёт быстрее.
|
|
||||||
|
|
||||||
При первом make выводится менюшка, можно просто save, exit и всё. Первый раз долго грузит зависимости.
|
|
||||||
|
|
||||||
Сборка пакета. Сами пакеты собираются быстро.
|
|
||||||
```
|
|
||||||
make package/podkop/{clean,compile} V=s
|
|
||||||
```
|
|
||||||
|
|
||||||
Также для luci
|
|
||||||
```
|
|
||||||
make package/luci-app-podkop/{clean,compile} V=s
|
|
||||||
```
|
|
||||||
|
|
||||||
.ipk лежат в `bin/packages/x86_64/base/`
|
|
||||||
|
|
||||||
## Примеры строк
|
|
||||||
https://github.com/itdoginfo/podkop/blob/main/String-example.md
|
|
||||||
|
|
||||||
## Ошибки
|
|
||||||
```
|
|
||||||
Makefile:17: /SDK/feeds/luci/luci.mk: No such file or directory
|
|
||||||
make[2]: *** No rule to make target '/SDK/feeds/luci/luci.mk'. Stop.
|
|
||||||
time: package/luci/luci-app-podkop/clean#0.00#0.00#0.00
|
|
||||||
ERROR: package/luci/luci-app-podkop failed to build.
|
|
||||||
make[1]: *** [package/Makefile:129: package/luci/luci-app-podkop/clean] Error 1
|
|
||||||
make[1]: Leaving directory '/SDK'
|
|
||||||
make: *** [/SDK/include/toplevel.mk:226: package/luci-app-podkop/clean] Error 2
|
|
||||||
```
|
|
||||||
|
|
||||||
Не загружены пакеты для luci
|
|
||||||
|
|
||||||
## make зависимости
|
|
||||||
https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
|
|
||||||
|
|
||||||
Ubuntu
|
|
||||||
```
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install build-essential clang flex bison g++ gawk \
|
|
||||||
gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev \
|
|
||||||
python3-distutils rsync unzip zlib1g-dev file wget
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ check_system() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if opkg list-installed | grep -qE "iptables|kmod-iptab"; then
|
if opkg list-installed | grep -q "iptables-mod-extra"; then
|
||||||
printf "\033[31;1mFound incompatible iptables packages. If you're using FriendlyWrt: https://t.me/itdogchat/44512/181082\033[0m\n"
|
printf "\033[31;1mFound incompatible iptables packages. If you're using FriendlyWrt: https://t.me/itdogchat/44512/181082\033[0m\n"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-podkop
|
PKG_NAME:=luci-app-podkop
|
||||||
PKG_VERSION:=0.3.43
|
PKG_VERSION:=0.4.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI podkop app
|
LUCI_TITLE:=LuCI podkop app
|
||||||
|
|||||||
@@ -12,9 +12,14 @@ const STATUS_COLORS = {
|
|||||||
WARNING: '#ff9800'
|
WARNING: '#ff9800'
|
||||||
};
|
};
|
||||||
|
|
||||||
const ERROR_POLL_INTERVAL = 5000; // 5 seconds
|
const DIAGNOSTICS_UPDATE_INTERVAL = 10000; // 10 seconds
|
||||||
|
const ERROR_POLL_INTERVAL = 10000; // 10 seconds
|
||||||
|
const COMMAND_TIMEOUT = 10000; // 10 seconds
|
||||||
|
const FETCH_TIMEOUT = 10000; // 10 seconds
|
||||||
|
const BUTTON_FEEDBACK_TIMEOUT = 1000; // 1 second
|
||||||
|
const DIAGNOSTICS_INITIAL_DELAY = 100; // 100 milliseconds
|
||||||
|
|
||||||
async function safeExec(command, args = [], timeout = 7000) {
|
async function safeExec(command, args = [], timeout = COMMAND_TIMEOUT) {
|
||||||
try {
|
try {
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
||||||
@@ -87,6 +92,7 @@ function createConfigSection(section, map, network) {
|
|||||||
o = s.taboption('basic', form.ListValue, 'mode', _('Connection Type'), _('Select between VPN and Proxy connection methods for traffic routing'));
|
o = s.taboption('basic', form.ListValue, 'mode', _('Connection Type'), _('Select between VPN and Proxy connection methods for traffic routing'));
|
||||||
o.value('proxy', ('Proxy'));
|
o.value('proxy', ('Proxy'));
|
||||||
o.value('vpn', ('VPN'));
|
o.value('vpn', ('VPN'));
|
||||||
|
o.value('block', ('Block'));
|
||||||
o.ucisection = s.section;
|
o.ucisection = s.section;
|
||||||
|
|
||||||
o = s.taboption('basic', form.ListValue, 'proxy_config_type', _('Configuration Type'), _('Select how to configure the proxy'));
|
o = s.taboption('basic', form.ListValue, 'proxy_config_type', _('Configuration Type'), _('Select how to configure the proxy'));
|
||||||
@@ -294,7 +300,7 @@ function createConfigSection(section, map, network) {
|
|||||||
o.value('russia_inside', 'Russia inside');
|
o.value('russia_inside', 'Russia inside');
|
||||||
o.value('russia_outside', 'Russia outside');
|
o.value('russia_outside', 'Russia outside');
|
||||||
o.value('ukraine_inside', 'Ukraine');
|
o.value('ukraine_inside', 'Ukraine');
|
||||||
o.value('geoblock', 'GEO Block');
|
o.value('geoblock', 'Geo Block');
|
||||||
o.value('block', 'Block');
|
o.value('block', 'Block');
|
||||||
o.value('porn', 'Porn');
|
o.value('porn', 'Porn');
|
||||||
o.value('news', 'News');
|
o.value('news', 'News');
|
||||||
@@ -307,6 +313,11 @@ function createConfigSection(section, map, network) {
|
|||||||
o.value('tiktok', 'Tik-Tok');
|
o.value('tiktok', 'Tik-Tok');
|
||||||
o.value('telegram', 'Telegram');
|
o.value('telegram', 'Telegram');
|
||||||
o.value('cloudflare', 'Cloudflare');
|
o.value('cloudflare', 'Cloudflare');
|
||||||
|
o.value('google_ai', 'Google AI');
|
||||||
|
o.value('google_play', 'Google Play');
|
||||||
|
o.value('hetzner', 'Hetzner ASN');
|
||||||
|
o.value('ovh', 'OVH ASN');
|
||||||
|
|
||||||
o.depends('domain_list_enabled', '1');
|
o.depends('domain_list_enabled', '1');
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.ucisection = s.section;
|
o.ucisection = s.section;
|
||||||
@@ -338,13 +349,13 @@ function createConfigSection(section, map, network) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (newValues.includes('russia_inside')) {
|
if (newValues.includes('russia_inside')) {
|
||||||
const allowedWithRussiaInside = ['russia_inside', 'meta', 'twitter', 'discord', 'telegram', 'cloudflare'];
|
const allowedWithRussiaInside = ['russia_inside', 'meta', 'twitter', 'discord', 'telegram', 'cloudflare', 'google_ai', 'google_play', 'hetzner', 'ovh'];
|
||||||
const removedServices = newValues.filter(v => !allowedWithRussiaInside.includes(v));
|
const removedServices = newValues.filter(v => !allowedWithRussiaInside.includes(v));
|
||||||
if (removedServices.length > 0) {
|
if (removedServices.length > 0) {
|
||||||
newValues = newValues.filter(v => allowedWithRussiaInside.includes(v));
|
newValues = newValues.filter(v => allowedWithRussiaInside.includes(v));
|
||||||
notifications.push(E('p', { class: 'alert-message warning' }, [
|
notifications.push(E('p', { class: 'alert-message warning' }, [
|
||||||
E('strong', {}, _('Russia inside restrictions')), E('br'),
|
E('strong', {}, _('Russia inside restrictions')), E('br'),
|
||||||
_('Warning: Russia inside can only be used with Meta, Twitter, Discord, Cloudflare and Telegram. %s already in Russia inside and have been removed from selection.')
|
_('Warning: Russia inside can only be used with Meta, Twitter, Discord, Cloudflare, Google AI, Google Play, Hetzner, OVH and Telegram. %s already in Russia inside and have been removed from selection.')
|
||||||
.format(removedServices.join(', '))
|
.format(removedServices.join(', '))
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
@@ -396,14 +407,18 @@ function createConfigSection(section, map, network) {
|
|||||||
|
|
||||||
const domainRegex = /^(?!-)[A-Za-z0-9-]+([-.][A-Za-z0-9-]+)*(\.[A-Za-z]{2,})?$/;
|
const domainRegex = /^(?!-)[A-Za-z0-9-]+([-.][A-Za-z0-9-]+)*(\.[A-Za-z]{2,})?$/;
|
||||||
const lines = value.split(/\n/).map(line => line.trim());
|
const lines = value.split(/\n/).map(line => line.trim());
|
||||||
|
let hasValidDomain = false;
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
// Skip empty lines or lines that start with //
|
// Skip empty lines
|
||||||
if (!line || line.startsWith('//')) continue;
|
if (!line) continue;
|
||||||
|
|
||||||
// Extract domain part (before any //)
|
// Extract domain part (before any //)
|
||||||
const domainPart = line.split('//')[0].trim();
|
const domainPart = line.split('//')[0].trim();
|
||||||
|
|
||||||
|
// Skip if line is empty after removing comments
|
||||||
|
if (!domainPart) continue;
|
||||||
|
|
||||||
// Process each domain in the line (separated by comma or space)
|
// Process each domain in the line (separated by comma or space)
|
||||||
const domains = domainPart.split(/[,\s]+/).map(d => d.trim()).filter(d => d.length > 0);
|
const domains = domainPart.split(/[,\s]+/).map(d => d.trim()).filter(d => d.length > 0);
|
||||||
|
|
||||||
@@ -411,8 +426,14 @@ function createConfigSection(section, map, network) {
|
|||||||
if (!domainRegex.test(domain)) {
|
if (!domainRegex.test(domain)) {
|
||||||
return _('Invalid domain format: %s. Enter domain without protocol').format(domain);
|
return _('Invalid domain format: %s. Enter domain without protocol').format(domain);
|
||||||
}
|
}
|
||||||
|
hasValidDomain = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hasValidDomain) {
|
||||||
|
return _('At least one valid domain must be specified. Comments-only content is not allowed.');
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -491,14 +512,18 @@ function createConfigSection(section, map, network) {
|
|||||||
|
|
||||||
const subnetRegex = /^(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?$/;
|
const subnetRegex = /^(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?$/;
|
||||||
const lines = value.split(/\n/).map(line => line.trim());
|
const lines = value.split(/\n/).map(line => line.trim());
|
||||||
|
let hasValidSubnet = false;
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
// Skip empty lines or lines that start with //
|
// Skip empty lines
|
||||||
if (!line || line.startsWith('//')) continue;
|
if (!line) continue;
|
||||||
|
|
||||||
// Extract subnet part (before any //)
|
// Extract subnet part (before any //)
|
||||||
const subnetPart = line.split('//')[0].trim();
|
const subnetPart = line.split('//')[0].trim();
|
||||||
|
|
||||||
|
// Skip if line is empty after removing comments
|
||||||
|
if (!subnetPart) continue;
|
||||||
|
|
||||||
// Process each subnet in the line (separated by comma or space)
|
// Process each subnet in the line (separated by comma or space)
|
||||||
const subnets = subnetPart.split(/[,\s]+/).map(s => s.trim()).filter(s => s.length > 0);
|
const subnets = subnetPart.split(/[,\s]+/).map(s => s.trim()).filter(s => s.length > 0);
|
||||||
|
|
||||||
@@ -522,8 +547,14 @@ function createConfigSection(section, map, network) {
|
|||||||
return _('CIDR must be between 0 and 32 in: %s').format(subnet);
|
return _('CIDR must be between 0 and 32 in: %s').format(subnet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
hasValidSubnet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hasValidSubnet) {
|
||||||
|
return _('At least one valid subnet or IP must be specified. Comments-only content is not allowed.');
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -575,7 +606,7 @@ const copyToClipboard = (text, button) => {
|
|||||||
document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
const originalText = button.textContent;
|
const originalText = button.textContent;
|
||||||
button.textContent = _('Copied!');
|
button.textContent = _('Copied!');
|
||||||
setTimeout(() => button.textContent = originalText, 1000);
|
setTimeout(() => button.textContent = originalText, BUTTON_FEEDBACK_TIMEOUT);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
ui.addNotification(null, E('p', {}, _('Failed to copy: ') + err.message));
|
ui.addNotification(null, E('p', {}, _('Failed to copy: ') + err.message));
|
||||||
}
|
}
|
||||||
@@ -630,31 +661,72 @@ const maskIP = (ip) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const showConfigModal = async (command, title) => {
|
const showConfigModal = async (command, title) => {
|
||||||
const res = await safeExec('/usr/bin/podkop', [command]);
|
// Create and show modal immediately with loading state
|
||||||
let formattedOutput = formatDiagnosticOutput(res.stdout || _('No output'));
|
const modalContent = E('div', { 'class': 'panel-body' }, [
|
||||||
|
E('div', {
|
||||||
|
'class': 'panel-body',
|
||||||
|
style: 'max-height: 70vh; overflow-y: auto; margin: 1em 0; padding: 1.5em; ' +
|
||||||
|
'font-family: monospace; white-space: pre-wrap; word-wrap: break-word; ' +
|
||||||
|
'line-height: 1.5; font-size: 14px;'
|
||||||
|
}, [
|
||||||
|
E('pre', {
|
||||||
|
'id': 'modal-content-pre',
|
||||||
|
style: 'margin: 0;'
|
||||||
|
}, _('Loading...'))
|
||||||
|
]),
|
||||||
|
E('div', {
|
||||||
|
'class': 'right',
|
||||||
|
style: 'margin-top: 1em;'
|
||||||
|
}, [
|
||||||
|
E('button', {
|
||||||
|
'class': 'btn',
|
||||||
|
'id': 'copy-button',
|
||||||
|
'click': ev => copyToClipboard('```txt\n' + document.getElementById('modal-content-pre').innerText + '\n```', ev.target)
|
||||||
|
}, _('Copy to Clipboard')),
|
||||||
|
E('button', {
|
||||||
|
'class': 'btn',
|
||||||
|
'click': ui.hideModal
|
||||||
|
}, _('Close'))
|
||||||
|
])
|
||||||
|
]);
|
||||||
|
|
||||||
|
ui.showModal(_(title), modalContent);
|
||||||
|
|
||||||
|
// Function to update modal content
|
||||||
|
const updateModalContent = (content) => {
|
||||||
|
const pre = document.getElementById('modal-content-pre');
|
||||||
|
if (pre) {
|
||||||
|
pre.textContent = content;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
let formattedOutput = '';
|
||||||
|
|
||||||
if (command === 'global_check') {
|
if (command === 'global_check') {
|
||||||
|
const res = await safeExec('/usr/bin/podkop', [command]);
|
||||||
|
formattedOutput = formatDiagnosticOutput(res.stdout || _('No output'));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const timeoutId = setTimeout(() => controller.abort(), 10000);
|
const timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT);
|
||||||
|
|
||||||
const response = await fetch('https://fakeip.tech-domain.club/check', { signal: controller.signal });
|
const response = await fetch('https://fakeip.podkop.fyi/check', { signal: controller.signal });
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
clearTimeout(timeoutId);
|
clearTimeout(timeoutId);
|
||||||
|
|
||||||
|
|
||||||
if (data.fakeip === true) {
|
if (data.fakeip === true) {
|
||||||
formattedOutput += '\n✅ ' + _('FakeIP is working in browser!') + '\n';
|
formattedOutput += '\n✅ ' + _('FakeIP is working in browser!') + '\n';
|
||||||
} else {
|
} else {
|
||||||
formattedOutput += '❌ ' + _('FakeIP is not working in browser') + '\n';
|
formattedOutput += '\n❌ ' + _('FakeIP is not working in browser') + '\n';
|
||||||
formattedOutput += _('Check DNS server on current device (PC, phone)') + '\n';
|
formattedOutput += _('Check DNS server on current device (PC, phone)') + '\n';
|
||||||
formattedOutput += _('Its must be router!') + '\n';
|
formattedOutput += _('Its must be router!') + '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bypass check
|
// Bypass check
|
||||||
const bypassResponse = await fetch('https://fakeip.tech-domain.club/check', { signal: controller.signal });
|
const bypassResponse = await fetch('https://fakeip.podkop.fyi/check', { signal: controller.signal });
|
||||||
const bypassData = await bypassResponse.json();
|
const bypassData = await bypassResponse.json();
|
||||||
const bypassResponse2 = await fetch('https://ip.tech-domain.club/check', { signal: controller.signal });
|
const bypassResponse2 = await fetch('https://ip.podkop.fyi/check', { signal: controller.signal });
|
||||||
const bypassData2 = await bypassResponse2.json();
|
const bypassData2 = await bypassResponse2.json();
|
||||||
|
|
||||||
formattedOutput += '━━━━━━━━━━━━━━━━━━━━━━━━━━━\n';
|
formattedOutput += '━━━━━━━━━━━━━━━━━━━━━━━━━━━\n';
|
||||||
@@ -670,13 +742,19 @@ const showConfigModal = async (command, title) => {
|
|||||||
formattedOutput += '❌ ' + _('Proxy check failed') + '\n';
|
formattedOutput += '❌ ' + _('Proxy check failed') + '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateModalContent(formattedOutput);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
formattedOutput += '\n❌ ' + _('Check failed: ') + (error.name === 'AbortError' ? _('timeout') : error.message) + '\n';
|
formattedOutput += '\n❌ ' + _('Check failed: ') + (error.name === 'AbortError' ? _('timeout') : error.message) + '\n';
|
||||||
|
updateModalContent(formattedOutput);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
const res = await safeExec('/usr/bin/podkop', [command]);
|
||||||
|
formattedOutput = formatDiagnosticOutput(res.stdout || _('No output'));
|
||||||
|
updateModalContent(formattedOutput);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
updateModalContent(_('Error: ') + error.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.showModal(_(title), createModalContent(_(title), formattedOutput));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Button Factory
|
// Button Factory
|
||||||
@@ -734,7 +812,7 @@ const createStatusPanel = (title, status, buttons, extraData = {}) => {
|
|||||||
title === 'Sing-box Status' ?
|
title === 'Sing-box Status' ?
|
||||||
(status.running && !status.enabled ? '✔ running' : '✘ ' + status.status) :
|
(status.running && !status.enabled ? '✔ running' : '✘ ' + status.status) :
|
||||||
title === 'Podkop Status' ?
|
title === 'Podkop Status' ?
|
||||||
(status.enabled ? '✔ enabled' : '✘ disabled') :
|
(status.enabled ? '✔ Autostart enabled' : '✘ Autostart disabled') :
|
||||||
(status.running ? '✔' : '✘') + ' ' + status.status
|
(status.running ? '✔' : '✘') + ' ' + status.status
|
||||||
])
|
])
|
||||||
].filter(Boolean);
|
].filter(Boolean);
|
||||||
@@ -754,16 +832,22 @@ const createStatusPanel = (title, status, buttons, extraData = {}) => {
|
|||||||
action: 'restart',
|
action: 'restart',
|
||||||
reload: true
|
reload: true
|
||||||
}),
|
}),
|
||||||
|
ButtonFactory.createActionButton({
|
||||||
|
label: 'Stop Podkop',
|
||||||
|
type: 'apply',
|
||||||
|
action: 'stop',
|
||||||
|
reload: true
|
||||||
|
}),
|
||||||
ButtonFactory.createInitActionButton({
|
ButtonFactory.createInitActionButton({
|
||||||
label: status.enabled ? 'Disable Podkop' : 'Enable Podkop',
|
label: status.enabled ? 'Disable Autostart' : 'Enable Autostart',
|
||||||
type: status.enabled ? 'remove' : 'apply',
|
type: status.enabled ? 'remove' : 'apply',
|
||||||
action: status.enabled ? 'disable' : 'enable',
|
action: status.enabled ? 'disable' : 'enable',
|
||||||
reload: true
|
reload: true
|
||||||
}),
|
}),
|
||||||
ButtonFactory.createModalButton({
|
ButtonFactory.createModalButton({
|
||||||
label: _('Global check'),
|
label: E('strong', _('Global check')),
|
||||||
command: 'global_check',
|
command: 'global_check',
|
||||||
title: _('Click here for all the info')
|
title: _('Global check')
|
||||||
}),
|
}),
|
||||||
ButtonFactory.createModalButton({
|
ButtonFactory.createModalButton({
|
||||||
label: 'View Logs',
|
label: 'View Logs',
|
||||||
@@ -776,8 +860,8 @@ const createStatusPanel = (title, status, buttons, extraData = {}) => {
|
|||||||
title: _('Lists Update Results')
|
title: _('Lists Update Results')
|
||||||
})
|
})
|
||||||
] : title === _('FakeIP Status') ? [
|
] : title === _('FakeIP Status') ? [
|
||||||
E('div', { style: 'margin-bottom: 10px;' }, [
|
|
||||||
E('div', { style: 'margin-bottom: 5px;' }, [
|
E('div', { style: 'margin-bottom: 5px;' }, [
|
||||||
|
E('div', {}, [
|
||||||
E('span', { style: `color: ${extraData.fakeipStatus?.color}` }, [
|
E('span', { style: `color: ${extraData.fakeipStatus?.color}` }, [
|
||||||
extraData.fakeipStatus?.state === 'working' ? '✔' : extraData.fakeipStatus?.state === 'not_working' ? '✘' : '!',
|
extraData.fakeipStatus?.state === 'working' ? '✔' : extraData.fakeipStatus?.state === 'not_working' ? '✘' : '!',
|
||||||
' ',
|
' ',
|
||||||
@@ -792,8 +876,8 @@ const createStatusPanel = (title, status, buttons, extraData = {}) => {
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
E('div', { style: 'margin-bottom: 10px;' }, [
|
|
||||||
E('div', { style: 'margin-bottom: 5px;' }, [
|
E('div', { style: 'margin-bottom: 5px;' }, [
|
||||||
|
E('div', {}, [
|
||||||
E('strong', {}, _('DNS Status')),
|
E('strong', {}, _('DNS Status')),
|
||||||
E('br'),
|
E('br'),
|
||||||
E('span', { style: `color: ${extraData.dnsStatus?.remote?.color}` }, [
|
E('span', { style: `color: ${extraData.dnsStatus?.remote?.color}` }, [
|
||||||
@@ -809,8 +893,8 @@ const createStatusPanel = (title, status, buttons, extraData = {}) => {
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
E('div', { style: 'margin-bottom: 10px;' }, [
|
|
||||||
E('div', { style: 'margin-bottom: 5px;' }, [
|
E('div', { style: 'margin-bottom: 5px;' }, [
|
||||||
|
E('div', {}, [
|
||||||
E('strong', {}, extraData.configName),
|
E('strong', {}, extraData.configName),
|
||||||
E('br'),
|
E('br'),
|
||||||
E('span', { style: `color: ${extraData.bypassStatus?.color}` }, [
|
E('span', { style: `color: ${extraData.bypassStatus?.color}` }, [
|
||||||
@@ -836,8 +920,14 @@ let createStatusSection = function (podkopStatus, singboxStatus, podkop, luci, s
|
|||||||
action: 'restart',
|
action: 'restart',
|
||||||
reload: true
|
reload: true
|
||||||
}),
|
}),
|
||||||
|
ButtonFactory.createActionButton({
|
||||||
|
label: 'Stop Podkop',
|
||||||
|
type: 'apply',
|
||||||
|
action: 'stop',
|
||||||
|
reload: true
|
||||||
|
}),
|
||||||
ButtonFactory.createInitActionButton({
|
ButtonFactory.createInitActionButton({
|
||||||
label: podkopStatus.enabled ? 'Disable Podkop' : 'Enable Podkop',
|
label: podkopStatus.enabled ? 'Disable Autostart' : 'Enable Autostart',
|
||||||
type: podkopStatus.enabled ? 'remove' : 'apply',
|
type: podkopStatus.enabled ? 'remove' : 'apply',
|
||||||
action: podkopStatus.enabled ? 'disable' : 'enable',
|
action: podkopStatus.enabled ? 'disable' : 'enable',
|
||||||
reload: true
|
reload: true
|
||||||
@@ -1036,6 +1126,64 @@ function stopErrorPolling() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function checkFakeIP() {
|
||||||
|
const createStatus = (state, message, color) => ({
|
||||||
|
state,
|
||||||
|
message: _(message),
|
||||||
|
color: STATUS_COLORS[color]
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
const controller = new AbortController();
|
||||||
|
const timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch('https://fakeip.podkop.fyi/check', { signal: controller.signal });
|
||||||
|
const data = await response.json();
|
||||||
|
clearTimeout(timeoutId);
|
||||||
|
|
||||||
|
if (data.fakeip === true) {
|
||||||
|
return createStatus('working', 'working', 'SUCCESS');
|
||||||
|
} else {
|
||||||
|
return createStatus('not_working', 'not working', 'ERROR');
|
||||||
|
}
|
||||||
|
} catch (fetchError) {
|
||||||
|
clearTimeout(timeoutId);
|
||||||
|
const message = fetchError.name === 'AbortError' ? 'timeout' : 'check error';
|
||||||
|
return createStatus('error', message, 'WARNING');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return createStatus('error', 'check error', 'WARNING');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function checkFakeIPCLI() {
|
||||||
|
const createStatus = (state, message, color) => ({
|
||||||
|
state,
|
||||||
|
message: _(message),
|
||||||
|
color: STATUS_COLORS[color]
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
const singboxStatusResult = await safeExec('/usr/bin/podkop', ['get_sing_box_status']);
|
||||||
|
const singboxStatus = JSON.parse(singboxStatusResult.stdout || '{"running":0,"dns_configured":0}');
|
||||||
|
|
||||||
|
if (!singboxStatus.running) {
|
||||||
|
return createStatus('not_working', 'sing-box not running', 'ERROR');
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = await safeExec('nslookup', ['-timeout=2', 'fakeip.podkop.fyi', '127.0.0.42']);
|
||||||
|
|
||||||
|
if (result.stdout && result.stdout.includes('198.18')) {
|
||||||
|
return createStatus('working', 'working on router', 'SUCCESS');
|
||||||
|
} else {
|
||||||
|
return createStatus('not_working', 'not working on router', 'ERROR');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return createStatus('error', 'CLI check error', 'WARNING');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return view.extend({
|
return view.extend({
|
||||||
async render() {
|
async render() {
|
||||||
document.head.insertAdjacentHTML('beforeend', `
|
document.head.insertAdjacentHTML('beforeend', `
|
||||||
@@ -1140,7 +1288,7 @@ return view.extend({
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
o = mainSection.taboption('additional', form.Value, 'dns_rewrite_ttl', _('DNS Rewrite TTL'), _('Time in seconds for DNS record caching (default: 600)'));
|
o = mainSection.taboption('additional', form.Value, 'dns_rewrite_ttl', _('DNS Rewrite TTL'), _('Time in seconds for DNS record caching (default: 60)'));
|
||||||
o.default = '60';
|
o.default = '60';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.ucisection = 'main';
|
o.ucisection = 'main';
|
||||||
@@ -1212,6 +1360,11 @@ return view.extend({
|
|||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.ucisection = 'main';
|
o.ucisection = 'main';
|
||||||
|
|
||||||
|
o = mainSection.taboption('additional', form.Flag, 'detour', _('Proxy download of lists'), _('Downloading all lists via main Proxy/VPN'));
|
||||||
|
o.default = '0';
|
||||||
|
o.rmempty = false;
|
||||||
|
o.ucisection = 'main';
|
||||||
|
|
||||||
// Extra IPs and exclusions (main section)
|
// Extra IPs and exclusions (main section)
|
||||||
o = mainSection.taboption('basic', form.Flag, 'exclude_from_ip_enabled', _('IP for exclusion'), _('Specify local IP addresses that will never use the configured route'));
|
o = mainSection.taboption('basic', form.Flag, 'exclude_from_ip_enabled', _('IP for exclusion'), _('Specify local IP addresses that will never use the configured route'));
|
||||||
o.default = '0';
|
o.default = '0';
|
||||||
@@ -1263,7 +1416,7 @@ return view.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateDiagnostics();
|
updateDiagnostics();
|
||||||
diagnosticsUpdateTimer = setInterval(updateDiagnostics, 10000);
|
diagnosticsUpdateTimer = setInterval(updateDiagnostics, DIAGNOSTICS_UPDATE_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopDiagnosticsUpdates() {
|
function stopDiagnosticsUpdates() {
|
||||||
@@ -1279,81 +1432,6 @@ return view.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkFakeIP() {
|
|
||||||
const createStatus = (state, message, color) => ({
|
|
||||||
state,
|
|
||||||
message: _(message),
|
|
||||||
color: STATUS_COLORS[color]
|
|
||||||
});
|
|
||||||
|
|
||||||
return new Promise(async (resolve) => {
|
|
||||||
try {
|
|
||||||
const singboxStatusResult = await safeExec('/usr/bin/podkop', ['get_sing_box_status']);
|
|
||||||
const singboxStatus = JSON.parse(singboxStatusResult.stdout || '{"running":0,"dns_configured":0}');
|
|
||||||
|
|
||||||
if (!singboxStatus.running) {
|
|
||||||
return resolve(createStatus('not_working', 'sing-box not running', 'ERROR'));
|
|
||||||
}
|
|
||||||
if (!singboxStatus.dns_configured) {
|
|
||||||
return resolve(createStatus('not_working', 'DNS not configured', 'ERROR'));
|
|
||||||
}
|
|
||||||
|
|
||||||
const controller = new AbortController();
|
|
||||||
const timeoutId = setTimeout(() => controller.abort(), 10000);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const response = await fetch('https://fakeip.tech-domain.club/check', { signal: controller.signal });
|
|
||||||
const data = await response.json();
|
|
||||||
clearTimeout(timeoutId);
|
|
||||||
|
|
||||||
if (data.fakeip === true) {
|
|
||||||
return resolve(createStatus('working', 'working', 'SUCCESS'));
|
|
||||||
} else {
|
|
||||||
return resolve(createStatus('not_working', 'not working', 'ERROR'));
|
|
||||||
}
|
|
||||||
} catch (fetchError) {
|
|
||||||
clearTimeout(timeoutId);
|
|
||||||
const message = fetchError.name === 'AbortError' ? 'timeout' : 'check error';
|
|
||||||
return resolve(createStatus('error', message, 'WARNING'));
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
return resolve(createStatus('error', 'check error', 'WARNING'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkFakeIPCLI() {
|
|
||||||
const createStatus = (state, message, color) => ({
|
|
||||||
state,
|
|
||||||
message: _(message),
|
|
||||||
color: STATUS_COLORS[color]
|
|
||||||
});
|
|
||||||
|
|
||||||
return new Promise(async (resolve) => {
|
|
||||||
try {
|
|
||||||
const singboxStatusResult = await safeExec('/usr/bin/podkop', ['get_sing_box_status']);
|
|
||||||
const singboxStatus = JSON.parse(singboxStatusResult.stdout || '{"running":0,"dns_configured":0}');
|
|
||||||
|
|
||||||
if (!singboxStatus.running) {
|
|
||||||
return resolve(createStatus('not_working', 'sing-box not running', 'ERROR'));
|
|
||||||
}
|
|
||||||
if (!singboxStatus.dns_configured) {
|
|
||||||
return resolve(createStatus('not_working', 'DNS not configured', 'ERROR'));
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = await safeExec('nslookup', ['-timeout=2', 'fakeip.tech-domain.club', '127.0.0.42']);
|
|
||||||
|
|
||||||
if (result.stdout && result.stdout.includes('198.18')) {
|
|
||||||
return resolve(createStatus('working', 'working on router', 'SUCCESS'));
|
|
||||||
} else {
|
|
||||||
return resolve(createStatus('not_working', 'not working on router', 'ERROR'));
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
return resolve(createStatus('error', 'CLI check error', 'WARNING'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkBypass() {
|
function checkBypass() {
|
||||||
const createStatus = (state, message, color) => ({
|
const createStatus = (state, message, color) => ({
|
||||||
state,
|
state,
|
||||||
@@ -1388,9 +1466,9 @@ return view.extend({
|
|||||||
let ip1 = null;
|
let ip1 = null;
|
||||||
try {
|
try {
|
||||||
const controller1 = new AbortController();
|
const controller1 = new AbortController();
|
||||||
const timeoutId1 = setTimeout(() => controller1.abort(), 10000);
|
const timeoutId1 = setTimeout(() => controller1.abort(), FETCH_TIMEOUT);
|
||||||
|
|
||||||
const response1 = await fetch('https://fakeip.tech-domain.club/check', { signal: controller1.signal });
|
const response1 = await fetch('https://fakeip.podkop.fyi/check', { signal: controller1.signal });
|
||||||
const data1 = await response1.json();
|
const data1 = await response1.json();
|
||||||
clearTimeout(timeoutId1);
|
clearTimeout(timeoutId1);
|
||||||
|
|
||||||
@@ -1403,9 +1481,9 @@ return view.extend({
|
|||||||
let ip2 = null;
|
let ip2 = null;
|
||||||
try {
|
try {
|
||||||
const controller2 = new AbortController();
|
const controller2 = new AbortController();
|
||||||
const timeoutId2 = setTimeout(() => controller2.abort(), 10000);
|
const timeoutId2 = setTimeout(() => controller2.abort(), FETCH_TIMEOUT);
|
||||||
|
|
||||||
const response2 = await fetch('https://ip.tech-domain.club/check', { signal: controller2.signal });
|
const response2 = await fetch('https://ip.podkop.fyi/check', { signal: controller2.signal });
|
||||||
const data2 = await response2.json();
|
const data2 = await response2.json();
|
||||||
clearTimeout(timeoutId2);
|
clearTimeout(timeoutId2);
|
||||||
|
|
||||||
@@ -1482,8 +1560,8 @@ return view.extend({
|
|||||||
checkDNSAvailability()
|
checkDNSAvailability()
|
||||||
.then(result => results.dnsStatus = result)
|
.then(result => results.dnsStatus = result)
|
||||||
.catch(() => results.dnsStatus = {
|
.catch(() => results.dnsStatus = {
|
||||||
remote: { state: 'error', message: 'check error', color: STATUS_COLORS.WARNING },
|
remote: createStatus('error', 'DNS check error', 'WARNING'),
|
||||||
local: { state: 'error', message: 'check error', color: STATUS_COLORS.WARNING }
|
local: createStatus('error', 'DNS check error', 'WARNING')
|
||||||
}),
|
}),
|
||||||
|
|
||||||
checkBypass()
|
checkBypass()
|
||||||
@@ -1653,7 +1731,7 @@ return view.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 100);
|
}, DIAGNOSTICS_INITIAL_DELAY);
|
||||||
|
|
||||||
node.classList.add('fade-in');
|
node.classList.add('fade-in');
|
||||||
return node;
|
return node;
|
||||||
|
|||||||
@@ -843,3 +843,33 @@ msgstr "Это должен быть роутер!"
|
|||||||
|
|
||||||
msgid "Global check"
|
msgid "Global check"
|
||||||
msgstr "Глобальная проверка"
|
msgstr "Глобальная проверка"
|
||||||
|
|
||||||
|
msgid "Starting lists update..."
|
||||||
|
msgstr "Начало обновления списков..."
|
||||||
|
|
||||||
|
msgid "DNS check passed"
|
||||||
|
msgstr "Проверка DNS пройдена"
|
||||||
|
|
||||||
|
msgid "DNS check failed after 60 attempts"
|
||||||
|
msgstr "Проверка DNS не удалась после 60 попыток"
|
||||||
|
|
||||||
|
msgid "GitHub connection check passed"
|
||||||
|
msgstr "Проверка подключения к GitHub пройдена"
|
||||||
|
|
||||||
|
msgid "GitHub connection check passed (via proxy)"
|
||||||
|
msgstr "Проверка подключения к GitHub пройдена (через прокси)"
|
||||||
|
|
||||||
|
msgid "GitHub connection check failed after 60 attempts"
|
||||||
|
msgstr "Проверка подключения к GitHub не удалась после 60 попыток"
|
||||||
|
|
||||||
|
msgid "Downloading and processing lists..."
|
||||||
|
msgstr "Загрузка и обработка списков..."
|
||||||
|
|
||||||
|
msgid "Lists update completed successfully"
|
||||||
|
msgstr "Обновление списков успешно завершено"
|
||||||
|
|
||||||
|
msgid "Lists update failed"
|
||||||
|
msgstr "Обновление списков не удалось"
|
||||||
|
|
||||||
|
msgid "Error: "
|
||||||
|
msgstr "Ошибка: "
|
||||||
@@ -1194,3 +1194,36 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "Global check"
|
msgid "Global check"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Starting lists update..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "DNS check passed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "DNS check failed after 60 attempts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "GitHub connection check passed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "GitHub connection check passed (via proxy)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "GitHub connection check failed after 60 attempts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Downloading and processing lists..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Lists update completed successfully"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Lists update failed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Loading..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Error: "
|
||||||
|
msgstr ""
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=podkop
|
PKG_NAME:=podkop
|
||||||
PKG_VERSION:=0.3.43
|
PKG_VERSION:=0.4.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
||||||
@@ -15,7 +15,7 @@ define Package/podkop
|
|||||||
DEPENDS:=+sing-box +curl +jq +kmod-nft-tproxy +coreutils-base64
|
DEPENDS:=+sing-box +curl +jq +kmod-nft-tproxy +coreutils-base64
|
||||||
CONFLICTS:=https-dns-proxy
|
CONFLICTS:=https-dns-proxy
|
||||||
TITLE:=Domain routing app
|
TITLE:=Domain routing app
|
||||||
URL:=https://itdog.info
|
URL:=https://podkop.net
|
||||||
PKGARCH:=all
|
PKGARCH:=all
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|||||||
@@ -39,3 +39,4 @@ config main 'main'
|
|||||||
option mon_restart_ifaces '0'
|
option mon_restart_ifaces '0'
|
||||||
#list restart_ifaces 'wan'
|
#list restart_ifaces 'wan'
|
||||||
option ss_uot '0'
|
option ss_uot '0'
|
||||||
|
option detour '0'
|
||||||
@@ -16,35 +16,41 @@ SUBNETS_META="${GITHUB_RAW_URL}/Subnets/IPv4/meta.lst"
|
|||||||
SUBNETS_DISCORD="${GITHUB_RAW_URL}/Subnets/IPv4/discord.lst"
|
SUBNETS_DISCORD="${GITHUB_RAW_URL}/Subnets/IPv4/discord.lst"
|
||||||
SUBNETS_TELERAM="${GITHUB_RAW_URL}/Subnets/IPv4/telegram.lst"
|
SUBNETS_TELERAM="${GITHUB_RAW_URL}/Subnets/IPv4/telegram.lst"
|
||||||
SUBNETS_CLOUDFLARE="${GITHUB_RAW_URL}/Subnets/IPv4/cloudflare.lst"
|
SUBNETS_CLOUDFLARE="${GITHUB_RAW_URL}/Subnets/IPv4/cloudflare.lst"
|
||||||
|
SUBNETS_HETZNER="${GITHUB_RAW_URL}/Subnets/IPv4/hetzner.lst"
|
||||||
|
SUBNETS_OVH="${GITHUB_RAW_URL}/Subnets/IPv4/ovh.lst"
|
||||||
SING_BOX_CONFIG="/etc/sing-box/config.json"
|
SING_BOX_CONFIG="/etc/sing-box/config.json"
|
||||||
FAKEIP="198.18.0.0/15"
|
FAKEIP="198.18.0.0/15"
|
||||||
VALID_SERVICES="russia_inside russia_outside ukraine_inside geoblock block porn news anime youtube discord meta twitter hdrezka tiktok telegram cloudflare"
|
VALID_SERVICES="russia_inside russia_outside ukraine_inside geoblock block porn news anime youtube discord meta twitter hdrezka tiktok telegram cloudflare google_ai google_play hetzner ovh"
|
||||||
DNS_RESOLVERS="1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 9.9.9.9 9.9.9.11 94.140.14.14 94.140.15.15 208.67.220.220 208.67.222.222 77.88.8.1 77.88.8.8"
|
DNS_RESOLVERS="1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 9.9.9.9 9.9.9.11 94.140.14.14 94.140.15.15 208.67.220.220 208.67.222.222 77.88.8.1 77.88.8.8"
|
||||||
TEST_DOMAIN="fakeip.tech-domain.club"
|
TEST_DOMAIN="fakeip.podkop.fyi"
|
||||||
INTERFACES_LIST=""
|
INTERFACES_LIST=""
|
||||||
SRC_INTERFACE=""
|
SRC_INTERFACE=""
|
||||||
RESOLV_CONF="/etc/resolv.conf"
|
RESOLV_CONF="/etc/resolv.conf"
|
||||||
CLOUDFLARE_OCTETS="103.21 103.22 103.31 104.16 104.17 104.18 104.19 104.20 104.21 104.22 104.23 104.24 104.25 104.26 104.27 104.28 108.162 131.0 141.101 162.158 162.159 172.64 172.65 172.66 172.67 172.68 172.69 172.70 172.71 173.245 188.114 190.93 197.234 198.41"
|
CLOUDFLARE_OCTETS="103.21 103.22 103.31 104.16 104.17 104.18 104.19 104.20 104.21 104.22 104.23 104.24 104.25 104.26 104.27 104.28 108.162 131.0 141.101 162.158 162.159 172.64 172.65 172.66 172.67 172.68 172.69 172.70 172.71 173.245 188.114 190.93 197.234 198.41"
|
||||||
|
|
||||||
|
# Color constants
|
||||||
|
COLOR_CYAN="\033[0;36m"
|
||||||
|
COLOR_GREEN="\033[0;32m"
|
||||||
|
COLOR_RESET="\033[0m"
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
local message="$1"
|
local message="$1"
|
||||||
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
local CYAN="\033[0;36m"
|
|
||||||
local GREEN="\033[0;32m"
|
|
||||||
local RESET="\033[0m"
|
|
||||||
|
|
||||||
echo -e "${CYAN}[$timestamp]${RESET} ${GREEN}$message${RESET}"
|
|
||||||
logger -t "podkop" "$timestamp $message"
|
logger -t "podkop" "$timestamp $message"
|
||||||
}
|
}
|
||||||
|
|
||||||
nolog() {
|
nolog() {
|
||||||
local message="$1"
|
local message="$1"
|
||||||
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
local CYAN="\033[0;36m"
|
|
||||||
local GREEN="\033[0;32m"
|
|
||||||
local RESET="\033[0m"
|
|
||||||
|
|
||||||
echo -e "${CYAN}[$timestamp]${RESET} ${GREEN}$message${RESET}"
|
echo -e "${COLOR_CYAN}[$timestamp]${COLOR_RESET} ${COLOR_GREEN}$message${COLOR_RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
echolog() {
|
||||||
|
local message="$1"
|
||||||
|
log "$message"
|
||||||
|
nolog "$message"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_main() {
|
start_main() {
|
||||||
@@ -71,7 +77,10 @@ start_main() {
|
|||||||
|
|
||||||
config_foreach process_validate_service
|
config_foreach process_validate_service
|
||||||
|
|
||||||
sleep 3
|
# Sync time for DoH/DoT
|
||||||
|
/usr/sbin/ntpd -q -p 194.190.168.1 -p 216.239.35.0 -p 216.239.35.4 -p 162.159.200.1 -p 162.159.200.123
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
|
||||||
mkdir -p /tmp/podkop
|
mkdir -p /tmp/podkop
|
||||||
|
|
||||||
@@ -132,6 +141,12 @@ start_main() {
|
|||||||
sing_box_quic_reject
|
sing_box_quic_reject
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
config_get_bool detour "main" "detour" "0"
|
||||||
|
if [ "$detour" -eq 1 ]; then
|
||||||
|
log "Detour mixed enable"
|
||||||
|
detour_mixed
|
||||||
|
fi
|
||||||
|
|
||||||
sing_box_config_check
|
sing_box_config_check
|
||||||
/etc/init.d/sing-box start
|
/etc/init.d/sing-box start
|
||||||
#/etc/init.d/sing-box enable
|
#/etc/init.d/sing-box enable
|
||||||
@@ -158,7 +173,7 @@ stop_main() {
|
|||||||
|
|
||||||
if [ -f /var/run/podkop_list_update.pid ]; then
|
if [ -f /var/run/podkop_list_update.pid ]; then
|
||||||
pid=$(cat /var/run/podkop_list_update.pid)
|
pid=$(cat /var/run/podkop_list_update.pid)
|
||||||
if kill -0 "$pid"; then
|
if kill -0 "$pid" 2>/dev/null; then
|
||||||
kill "$pid" 2>/dev/null
|
kill "$pid" 2>/dev/null
|
||||||
log "Stopped list_update"
|
log "Stopped list_update"
|
||||||
fi
|
fi
|
||||||
@@ -204,6 +219,12 @@ reload() {
|
|||||||
start_main
|
start_main
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
log "Podkop restart"
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
# Migrations and validation funcs
|
# Migrations and validation funcs
|
||||||
migration() {
|
migration() {
|
||||||
# list migrate
|
# list migrate
|
||||||
@@ -367,8 +388,6 @@ save_dnsmasq_config() {
|
|||||||
|
|
||||||
dnsmasq_add_resolver() {
|
dnsmasq_add_resolver() {
|
||||||
log "Save dnsmasq config"
|
log "Save dnsmasq config"
|
||||||
save_dnsmasq_config "dhcp.@dnsmasq[0].noresolv" "dhcp.@dnsmasq[0].podkop_noresolv"
|
|
||||||
save_dnsmasq_config "dhcp.@dnsmasq[0].cachesize" "dhcp.@dnsmasq[0].podkop_cachesize"
|
|
||||||
|
|
||||||
uci -q delete dhcp.@dnsmasq[0].podkop_server
|
uci -q delete dhcp.@dnsmasq[0].podkop_server
|
||||||
for server in $(uci get dhcp.@dnsmasq[0].server 2>/dev/null); do
|
for server in $(uci get dhcp.@dnsmasq[0].server 2>/dev/null); do
|
||||||
@@ -380,6 +399,9 @@ dnsmasq_add_resolver() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
save_dnsmasq_config "dhcp.@dnsmasq[0].noresolv" "dhcp.@dnsmasq[0].podkop_noresolv"
|
||||||
|
save_dnsmasq_config "dhcp.@dnsmasq[0].cachesize" "dhcp.@dnsmasq[0].podkop_cachesize"
|
||||||
|
|
||||||
log "Configure dnsmasq for sing-box"
|
log "Configure dnsmasq for sing-box"
|
||||||
uci set dhcp.@dnsmasq[0].noresolv="1"
|
uci set dhcp.@dnsmasq[0].noresolv="1"
|
||||||
uci set dhcp.@dnsmasq[0].cachesize="0"
|
uci set dhcp.@dnsmasq[0].cachesize="0"
|
||||||
@@ -410,11 +432,11 @@ dnsmasq_restore() {
|
|||||||
|
|
||||||
local server=$(uci get dhcp.@dnsmasq[0].server 2>/dev/null)
|
local server=$(uci get dhcp.@dnsmasq[0].server 2>/dev/null)
|
||||||
if [[ "$server" == "127.0.0.42" ]]; then
|
if [[ "$server" == "127.0.0.42" ]]; then
|
||||||
uci -q delete dhcp.@dnsmasq[0].server
|
uci -q delete dhcp.@dnsmasq[0].server 2>/dev/null
|
||||||
for server in $(uci get dhcp.@dnsmasq[0].podkop_server 2>/dev/null); do
|
for server in $(uci get dhcp.@dnsmasq[0].podkop_server 2>/dev/null); do
|
||||||
uci add_list dhcp.@dnsmasq[0].server="$server"
|
uci add_list dhcp.@dnsmasq[0].server="$server"
|
||||||
done
|
done
|
||||||
uci delete dhcp.@dnsmasq[0].podkop_server
|
uci delete dhcp.@dnsmasq[0].podkop_server 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
uci delete dhcp.@dnsmasq[0].podkop_cachesize
|
uci delete dhcp.@dnsmasq[0].podkop_cachesize
|
||||||
@@ -545,13 +567,13 @@ prepare_custom_ruleset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
list_update() {
|
list_update() {
|
||||||
log "Update remote lists"
|
echolog "🔄 Starting lists update..."
|
||||||
|
|
||||||
local i
|
local i
|
||||||
|
|
||||||
for i in $(seq 1 60); do
|
for i in $(seq 1 60); do
|
||||||
if nslookup -timeout=1 openwrt.org >/dev/null 2>&1; then
|
if nslookup -timeout=1 openwrt.org >/dev/null 2>&1; then
|
||||||
log "DNS is available"
|
echolog "✅ DNS check passed"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
log "DNS is unavailable [$i/60]"
|
log "DNS is unavailable [$i/60]"
|
||||||
@@ -559,27 +581,44 @@ list_update() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$i" -eq 60 ]; then
|
if [ "$i" -eq 60 ]; then
|
||||||
log "Error: DNS check failed after 10 attempts"
|
echolog "❌ DNS check failed after 60 attempts"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in $(seq 1 60); do
|
for i in $(seq 1 60); do
|
||||||
if curl -s -m 3 https://github.com >/dev/null; then
|
config_get_bool detour "main" "detour" "0"
|
||||||
log "GitHub is available"
|
if [ "$detour" -eq 1 ]; then
|
||||||
|
if http_proxy="http://127.0.0.1:4534" https_proxy="http://127.0.0.1:4534" curl -s -m 3 https://github.com >/dev/null; then
|
||||||
|
echolog "✅ GitHub connection check passed (via proxy)"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
log "GitHub is unavailable [$i/60]"
|
else
|
||||||
|
if curl -s -m 3 https://github.com >/dev/null; then
|
||||||
|
echolog "✅ GitHub connection check passed"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echolog "GitHub is unavailable [$i/60]"
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$i" -eq 60 ]; then
|
if [ "$i" -eq 60 ]; then
|
||||||
log "Error: Cannot connect to GitHub after 10 attempts"
|
echolog "❌ GitHub connection check failed after 60 attempts"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echolog "📥 Downloading and processing lists..."
|
||||||
|
|
||||||
config_foreach process_remote_ruleset_subnet
|
config_foreach process_remote_ruleset_subnet
|
||||||
config_foreach process_domains_list_url
|
config_foreach process_domains_list_url
|
||||||
config_foreach process_subnet_for_section_remote
|
config_foreach process_subnet_for_section_remote
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echolog "✅ Lists update completed successfully"
|
||||||
|
else
|
||||||
|
echolog "❌ Lists update failed"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
find_working_resolver() {
|
find_working_resolver() {
|
||||||
@@ -776,7 +815,7 @@ sing_box_create_bypass_ruleset() {
|
|||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
"domain_suffix": [
|
"domain_suffix": [
|
||||||
"ip.tech-domain.club"
|
"ip.podkop.fyi"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -922,6 +961,9 @@ sing_box_outdound() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
"block")
|
||||||
|
log "Block mode"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
log "Requires *vpn* or *proxy* value"
|
log "Requires *vpn* or *proxy* value"
|
||||||
return
|
return
|
||||||
@@ -1012,7 +1054,7 @@ sing_box_config_outbound_json() {
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
log "Outbound config updated successfully"
|
log "Outbound config updated successfully"
|
||||||
else
|
else
|
||||||
log "Error: Invalid JSON config generated"
|
log "Error: Outbound invalid JSON config generated"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -1073,9 +1115,9 @@ sing_box_config_shadowsocks() {
|
|||||||
)' $SING_BOX_CONFIG >/tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json $SING_BOX_CONFIG
|
)' $SING_BOX_CONFIG >/tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json $SING_BOX_CONFIG
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
log "Config updated successfully"
|
log "Config Shadowsocks updated successfully"
|
||||||
else
|
else
|
||||||
log "Error: Invalid JSON config generated"
|
log "Error: Shadowsocks invalid JSON config generated"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -1200,10 +1242,10 @@ sing_box_config_vless() {
|
|||||||
|
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
log "Config created successfully"
|
log "Config VLESS created successfully"
|
||||||
else
|
else
|
||||||
log "Error: Invalid JSON config generated"
|
log "[critical] Error: VLESS invalid JSON config generated"
|
||||||
return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1356,6 +1398,7 @@ sing_box_ruleset_remote() {
|
|||||||
local tag=$1
|
local tag=$1
|
||||||
local type=$2
|
local type=$2
|
||||||
local update_interval=$3
|
local update_interval=$3
|
||||||
|
local detour=$4
|
||||||
|
|
||||||
url="$SRS_MAIN_URL/$tag.srs"
|
url="$SRS_MAIN_URL/$tag.srs"
|
||||||
|
|
||||||
@@ -1371,15 +1414,19 @@ sing_box_ruleset_remote() {
|
|||||||
--arg type "$type" \
|
--arg type "$type" \
|
||||||
--arg url "$url" \
|
--arg url "$url" \
|
||||||
--arg update_interval "$update_interval" \
|
--arg update_interval "$update_interval" \
|
||||||
|
--arg detour "$detour" \
|
||||||
'
|
'
|
||||||
.route.rule_set += [
|
.route.rule_set += [
|
||||||
|
(
|
||||||
{
|
{
|
||||||
"tag": $tag,
|
"tag": $tag,
|
||||||
"type": $type,
|
"type": $type,
|
||||||
"format": "binary",
|
"format": "binary",
|
||||||
"url": $url,
|
"url": $url,
|
||||||
"update_interval": $update_interval
|
"update_interval": $update_interval
|
||||||
}
|
} +
|
||||||
|
(if $detour == "1" then {"download_detour": "main"} else {} end)
|
||||||
|
)
|
||||||
]' "$SING_BOX_CONFIG" > /tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json "$SING_BOX_CONFIG"
|
]' "$SING_BOX_CONFIG" > /tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json "$SING_BOX_CONFIG"
|
||||||
|
|
||||||
log "Added new ruleset with tag $tag"
|
log "Added new ruleset with tag $tag"
|
||||||
@@ -1403,6 +1450,12 @@ list_subnets_download() {
|
|||||||
"cloudflare")
|
"cloudflare")
|
||||||
URL=$SUBNETS_CLOUDFLARE
|
URL=$SUBNETS_CLOUDFLARE
|
||||||
;;
|
;;
|
||||||
|
"hetzner")
|
||||||
|
URL=$SUBNETS_HETZNER
|
||||||
|
;;
|
||||||
|
"ovh")
|
||||||
|
URL=$SUBNETS_OVH
|
||||||
|
;;
|
||||||
"discord")
|
"discord")
|
||||||
URL=$SUBNETS_DISCORD
|
URL=$SUBNETS_DISCORD
|
||||||
nft add set inet $table podkop_discord_subnets { type ipv4_addr\; flags interval\; auto-merge\; }
|
nft add set inet $table podkop_discord_subnets { type ipv4_addr\; flags interval\; auto-merge\; }
|
||||||
@@ -1414,7 +1467,13 @@ list_subnets_download() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
local filename=$(basename "$URL")
|
local filename=$(basename "$URL")
|
||||||
|
|
||||||
|
config_get_bool detour "main" "detour" "0"
|
||||||
|
if [ "$detour" -eq 1 ]; then
|
||||||
|
http_proxy="http://127.0.0.1:4534" https_proxy="http://127.0.0.1:4534" wget -O "/tmp/podkop/$filename" "$URL"
|
||||||
|
else
|
||||||
wget -O "/tmp/podkop/$filename" "$URL"
|
wget -O "/tmp/podkop/$filename" "$URL"
|
||||||
|
fi
|
||||||
|
|
||||||
while IFS= read -r subnet; do
|
while IFS= read -r subnet; do
|
||||||
if [ "$service" = "discord" ]; then
|
if [ "$service" = "discord" ]; then
|
||||||
@@ -1430,6 +1489,32 @@ sing_box_rules() {
|
|||||||
local rule_set="$1"
|
local rule_set="$1"
|
||||||
local outbound="$2"
|
local outbound="$2"
|
||||||
|
|
||||||
|
config_get mode "$section" "mode"
|
||||||
|
|
||||||
|
if [[ "$mode" == "block" ]]; then
|
||||||
|
# Action reject
|
||||||
|
# Check if there is an rule with reject"
|
||||||
|
local rule_exists=$(jq -r '.route.rules[] | select(.inbound == ["tproxy-in"] and .action == "reject")' "$SING_BOX_CONFIG")
|
||||||
|
|
||||||
|
if [[ -n "$rule_exists" ]]; then
|
||||||
|
# If a rule for rejectexists, add a new rule_set to the existing rule
|
||||||
|
jq \
|
||||||
|
--arg rule_set "$rule_set" \
|
||||||
|
'(.route.rules[] | select(.inbound == ["tproxy-in"] and .action == "reject") .rule_set) += [$rule_set]' \
|
||||||
|
"$SING_BOX_CONFIG" > /tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json "$SING_BOX_CONFIG"
|
||||||
|
else
|
||||||
|
# If there is no rule for reject, create a new one with rule_set
|
||||||
|
jq \
|
||||||
|
--arg rule_set "$rule_set" \
|
||||||
|
'.route.rules += [{
|
||||||
|
"inbound": ["tproxy-in"],
|
||||||
|
"rule_set": [$rule_set],
|
||||||
|
"action": "reject"
|
||||||
|
}]' "$SING_BOX_CONFIG" > /tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json "$SING_BOX_CONFIG"
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
else
|
||||||
|
# Action route
|
||||||
# Check if there is an outbound rule for "tproxy-in"
|
# Check if there is an outbound rule for "tproxy-in"
|
||||||
local rule_exists=$(jq -r '.route.rules[] | select(.outbound == "'"$outbound"'" and .inbound == ["tproxy-in"])' "$SING_BOX_CONFIG")
|
local rule_exists=$(jq -r '.route.rules[] | select(.outbound == "'"$outbound"'" and .inbound == ["tproxy-in"])' "$SING_BOX_CONFIG")
|
||||||
|
|
||||||
@@ -1452,6 +1537,7 @@ sing_box_rules() {
|
|||||||
"action": "route"
|
"action": "route"
|
||||||
}]' "$SING_BOX_CONFIG" >/tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json "$SING_BOX_CONFIG"
|
}]' "$SING_BOX_CONFIG" >/tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json "$SING_BOX_CONFIG"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
sing_box_quic_reject() {
|
sing_box_quic_reject() {
|
||||||
@@ -1476,8 +1562,9 @@ sing_box_quic_reject() {
|
|||||||
process_remote_ruleset_srs() {
|
process_remote_ruleset_srs() {
|
||||||
config_get_bool domain_list_enabled "$section" "domain_list_enabled" "0"
|
config_get_bool domain_list_enabled "$section" "domain_list_enabled" "0"
|
||||||
if [ "$domain_list_enabled" -eq 1 ]; then
|
if [ "$domain_list_enabled" -eq 1 ]; then
|
||||||
|
config_get_bool detour "main" "detour" "0"
|
||||||
log "Adding a srs list for $section"
|
log "Adding a srs list for $section"
|
||||||
config_list_foreach "$section" domain_list "sing_box_ruleset_remote" "remote" "1d"
|
config_list_foreach "$section" domain_list "sing_box_ruleset_remote" "remote" "1d" "$detour"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1543,13 +1630,24 @@ list_custom_url_domains_create() {
|
|||||||
local section="$2"
|
local section="$2"
|
||||||
local URL="$1"
|
local URL="$1"
|
||||||
local filename=$(basename "$URL")
|
local filename=$(basename "$URL")
|
||||||
|
local filepath="/tmp/podkop/${filename}"
|
||||||
|
|
||||||
wget -q -O "/tmp/podkop/${filename}" "$URL"
|
config_get_bool detour "main" "detour" "0"
|
||||||
|
if [ "$detour" -eq 1 ]; then
|
||||||
|
http_proxy="http://127.0.0.1:4534" https_proxy="http://127.0.0.1:4534" wget -O "$filepath" "$URL"
|
||||||
|
else
|
||||||
|
wget -O "$filepath" "$URL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -q $'\r' "$filepath"; then
|
||||||
|
log "$filename has Windows line endings (CRLF). Converting to Unix (LF)"
|
||||||
|
sed -i 's/\r$//' "$filepath"
|
||||||
|
fi
|
||||||
|
|
||||||
while IFS= read -r domain; do
|
while IFS= read -r domain; do
|
||||||
log "From downloaded file: $domain"
|
log "From downloaded file: $domain"
|
||||||
sing_box_ruleset_domains_json $domain $section
|
sing_box_ruleset_domains_json $domain $section
|
||||||
done <"/tmp/podkop/$filename"
|
done <"$filepath"
|
||||||
}
|
}
|
||||||
|
|
||||||
process_domains_list_url() {
|
process_domains_list_url() {
|
||||||
@@ -1583,14 +1681,25 @@ list_custom_url_subnets_create() {
|
|||||||
local section="$2"
|
local section="$2"
|
||||||
local URL="$1"
|
local URL="$1"
|
||||||
local filename=$(basename "$URL")
|
local filename=$(basename "$URL")
|
||||||
|
local filepath="/tmp/podkop/${filename}"
|
||||||
|
|
||||||
wget -q -O "/tmp/podkop/${filename}" "$URL"
|
config_get_bool detour "main" "detour" "0"
|
||||||
|
if [ "$detour" -eq 1 ]; then
|
||||||
|
http_proxy="http://127.0.0.1:4534" https_proxy="http://127.0.0.1:4534" wget -O "$filepath" "$URL"
|
||||||
|
else
|
||||||
|
wget -O "$filepath" "$URL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if grep -q $'\r' "$filepath"; then
|
||||||
|
log "$filename has Windows line endings (CRLF). Converting to Unix (LF)"
|
||||||
|
sed -i 's/\r$//' "$filepath"
|
||||||
|
fi
|
||||||
|
|
||||||
while IFS= read -r subnet; do
|
while IFS= read -r subnet; do
|
||||||
log "From local file: $subnet"
|
log "From local file: $subnet"
|
||||||
sing_box_ruleset_subnets_json $subnet $section
|
sing_box_ruleset_subnets_json $subnet $section
|
||||||
nft add element inet PodkopTable podkop_subnets { $subnet }
|
nft add element inet PodkopTable podkop_subnets { $subnet }
|
||||||
done <"/tmp/podkop/$filename"
|
done <"$filepath"
|
||||||
}
|
}
|
||||||
|
|
||||||
process_subnet_for_section_remote() {
|
process_subnet_for_section_remote() {
|
||||||
@@ -1643,6 +1752,31 @@ sing_box_rules_source_ip_cidr() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
detour_mixed() {
|
||||||
|
local section="main"
|
||||||
|
local port="4534"
|
||||||
|
local tag="detour"
|
||||||
|
|
||||||
|
log "Adding detour Socks5 for $section on port $port"
|
||||||
|
|
||||||
|
jq \
|
||||||
|
--arg tag "$tag" \
|
||||||
|
--arg port "$port" \
|
||||||
|
--arg section "$section" \
|
||||||
|
'.inbounds += [{
|
||||||
|
"tag": $tag,
|
||||||
|
"type": "mixed",
|
||||||
|
"listen": "127.0.0.1",
|
||||||
|
"listen_port": ($port|tonumber),
|
||||||
|
"set_system_proxy": false
|
||||||
|
}] |
|
||||||
|
.route.rules += [{
|
||||||
|
"inbound": [$tag],
|
||||||
|
"outbound": $section,
|
||||||
|
"action": "route"
|
||||||
|
}]' $SING_BOX_CONFIG >/tmp/sing-box-config-tmp.json && mv /tmp/sing-box-config-tmp.json $SING_BOX_CONFIG
|
||||||
|
}
|
||||||
|
|
||||||
## nftables
|
## nftables
|
||||||
list_all_traffic_from_ip() {
|
list_all_traffic_from_ip() {
|
||||||
local ip="$1"
|
local ip="$1"
|
||||||
@@ -1777,7 +1911,14 @@ check_github() {
|
|||||||
for url in "$DOMAINS_RU_INSIDE" "$DOMAINS_RU_OUTSIDE" "$DOMAINS_UA" "$DOMAINS_YOUTUBE" \
|
for url in "$DOMAINS_RU_INSIDE" "$DOMAINS_RU_OUTSIDE" "$DOMAINS_UA" "$DOMAINS_YOUTUBE" \
|
||||||
"$SUBNETS_TWITTER" "$SUBNETS_META" "$SUBNETS_DISCORD"; do
|
"$SUBNETS_TWITTER" "$SUBNETS_META" "$SUBNETS_DISCORD"; do
|
||||||
local list_name=$(basename "$url")
|
local list_name=$(basename "$url")
|
||||||
|
|
||||||
|
config_get_bool detour "main" "detour" "0"
|
||||||
|
if [ "$detour" -eq 1 ]; then
|
||||||
|
http_proxy="http://127.0.0.1:4534" https_proxy="http://127.0.0.1:4534" wget -q -O /dev/null "$url"
|
||||||
|
else
|
||||||
wget -q -O /dev/null "$url"
|
wget -q -O /dev/null "$url"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
nolog "- $list_name: available"
|
nolog "- $list_name: available"
|
||||||
else
|
else
|
||||||
@@ -2078,24 +2219,47 @@ check_dns_available() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$dns_type" = "doh" ]; then
|
if [ "$dns_type" = "doh" ]; then
|
||||||
local result=""
|
# Generate random DNS query ID (2 bytes)
|
||||||
|
local random_id=$(head -c2 /dev/urandom | hexdump -ve '1/1 "%.2x"' 2>/dev/null)
|
||||||
if echo "$dns_server" | grep -q "quad9.net" || \
|
if [ $? -ne 0 ]; then
|
||||||
echo "$dns_server" | grep -qE "^9\.9\.9\.(9|10|11)$|^149\.112\.112\.(112|10|11)$|^2620:fe::(fe|9|10|11)$|^2620:fe::fe:(10|11)$"; then
|
error_message="Failed to generate random ID"
|
||||||
result=$(curl --connect-timeout 5 -s -H "accept: application/dns-json" "https://$dns_server:5053/dns-query?name=itdog.info&type=A")
|
status="internal error"
|
||||||
else
|
else
|
||||||
result=$(curl --connect-timeout 5 -s -H "accept: application/dns-json" "https://$dns_server/dns-query?name=itdog.info&type=A")
|
# Create DNS wire format query for google.com A record with random ID
|
||||||
if [ $? -eq 0 ] && echo "$result" | grep -q "data"; then
|
local dns_query=$(printf "\x${random_id:0:2}\x${random_id:2:2}\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x03www\x06google\x03com\x00\x00\x01\x00\x01" | base64 2>/dev/null)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
error_message="Failed to generate DNS query"
|
||||||
|
status="internal error"
|
||||||
|
else
|
||||||
|
# Try POST method first (RFC 8484 compliant) with shorter timeout
|
||||||
|
local result=$(echo "$dns_query" | base64 -d 2>/dev/null | curl -H "Content-Type: application/dns-message" \
|
||||||
|
-H "Accept: application/dns-message" \
|
||||||
|
--data-binary @- \
|
||||||
|
--max-time 2 \
|
||||||
|
--connect-timeout 1 \
|
||||||
|
-s \
|
||||||
|
"https://$dns_server/dns-query" 2>/dev/null)
|
||||||
|
|
||||||
|
if [ $? -eq 0 ] && [ -n "$result" ]; then
|
||||||
is_available=1
|
is_available=1
|
||||||
status="available"
|
status="available"
|
||||||
else
|
else
|
||||||
result=$(curl --connect-timeout 5 -s -H "accept: application/dns-json" "https://$dns_server/resolve?name=itdog.info&type=A")
|
# Try GET method as fallback with shorter timeout
|
||||||
fi
|
local dns_query_no_padding=$(echo "$dns_query" | tr -d '=' 2>/dev/null)
|
||||||
fi
|
result=$(curl -H "accept: application/dns-message" \
|
||||||
|
--max-time 2 \
|
||||||
|
--connect-timeout 1 \
|
||||||
|
-s \
|
||||||
|
"https://$dns_server/dns-query?dns=$dns_query_no_padding" 2>/dev/null)
|
||||||
|
|
||||||
if [ $? -eq 0 ] && echo "$result" | grep -q "data"; then
|
if [ $? -eq 0 ] && [ -n "$result" ]; then
|
||||||
is_available=1
|
is_available=1
|
||||||
status="available"
|
status="available"
|
||||||
|
else
|
||||||
|
error_message="DoH server not responding"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ "$dns_type" = "dot" ]; then
|
elif [ "$dns_type" = "dot" ]; then
|
||||||
(nc "$dns_server" 853 </dev/null >/dev/null 2>&1) & pid=$!
|
(nc "$dns_server" 853 </dev/null >/dev/null 2>&1) & pid=$!
|
||||||
@@ -2300,6 +2464,40 @@ global_check() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
show_help() {
|
||||||
|
cat << EOF
|
||||||
|
Usage: $0 COMMAND
|
||||||
|
|
||||||
|
Available commands:
|
||||||
|
start Start podkop service
|
||||||
|
stop Stop podkop service
|
||||||
|
reload Reload podkop configuration
|
||||||
|
restart Restart podkop service
|
||||||
|
enable Enable podkop autostart
|
||||||
|
disable Disable podkop autostart
|
||||||
|
main Run main podkop process
|
||||||
|
list_update Update domain lists
|
||||||
|
check_proxy Check proxy connectivity
|
||||||
|
check_nft Check NFT rules
|
||||||
|
check_github Check GitHub connectivity
|
||||||
|
check_logs Show podkop logs from system journal
|
||||||
|
check_sing_box_connections Show active sing-box connections
|
||||||
|
check_sing_box_logs Show sing-box logs
|
||||||
|
check_fakeip Check FakeIP DNS functionality
|
||||||
|
check_dnsmasq Check DNSMasq configuration
|
||||||
|
show_config Display current podkop configuration
|
||||||
|
show_version Show podkop version
|
||||||
|
show_sing_box_config Show sing-box configuration
|
||||||
|
show_luci_version Show LuCI app version
|
||||||
|
show_sing_box_version Show sing-box version
|
||||||
|
show_system_info Show system information
|
||||||
|
get_status Get podkop service status
|
||||||
|
get_sing_box_status Get sing-box service status
|
||||||
|
check_dns_available Check DNS server availability
|
||||||
|
global_check Run global system check
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
@@ -2310,6 +2508,9 @@ case "$1" in
|
|||||||
reload)
|
reload)
|
||||||
reload
|
reload
|
||||||
;;
|
;;
|
||||||
|
restart)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
main)
|
main)
|
||||||
main
|
main
|
||||||
;;
|
;;
|
||||||
@@ -2371,7 +2572,7 @@ case "$1" in
|
|||||||
global_check
|
global_check
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop|reload|enable|disable|main|list_update|check_proxy|check_nft|check_github|check_logs|check_sing_box_connections|check_sing_box_logs|check_fakeip|check_dnsmasq|show_config|show_version|show_sing_box_config|show_luci_version|show_sing_box_version|show_system_info|get_status|get_sing_box_status|check_dns_available|global_check}"
|
show_help
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
Reference in New Issue
Block a user