mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-06 11:36:50 +03:00
fix: Fix secondary route configuration
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
FROM openwrt/sdk:x86_64-v23.05.5
|
FROM openwrt/sdk:x86_64-v23.05.5
|
||||||
|
|
||||||
FROM openwrt/sdk:x86_64-v23.05.5
|
|
||||||
|
|
||||||
RUN ./scripts/feeds update -a && ./scripts/feeds install luci-base && mkdir -p /builder/package/feeds/utilites/ && mkdir -p /builder/package/feeds/luci/
|
RUN ./scripts/feeds update -a && ./scripts/feeds install luci-base && mkdir -p /builder/package/feeds/utilites/ && mkdir -p /builder/package/feeds/luci/
|
||||||
|
|
||||||
COPY ./podkop /builder/package/feeds/utilites/podkop
|
COPY ./podkop /builder/package/feeds/utilites/podkop
|
||||||
COPY ./luci-app-podkop /builder/package/feeds/luci/luci-app-podkop
|
COPY ./luci-app-podkop /builder/package/feeds/luci/luci-app-podkop
|
||||||
|
|
||||||
RUN make defconfig && make package/podkop/compile && make package/luci-app-podkop/compile V=s
|
RUN make defconfig && make package/podkop/compile && make package/luci-app-podkop/compile V=s -j4
|
||||||
@@ -5,7 +5,7 @@ PKG_VERSION:=0.2.3
|
|||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI podkop app
|
LUCI_TITLE:=LuCI podkop app
|
||||||
LUCI_DEPENDS:=+podkop
|
LUCI_DEPENDS:=+luci-base +podkop
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
LUCI_LANG.ru:=Русский (Russian)
|
LUCI_LANG.ru:=Русский (Russian)
|
||||||
LUCI_LANG.en:=English
|
LUCI_LANG.en:=English
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ return view.extend({
|
|||||||
s = m.section(form.TypedSection, 'main');
|
s = m.section(form.TypedSection, 'main');
|
||||||
s.anonymous = true;
|
s.anonymous = true;
|
||||||
|
|
||||||
|
// Basic Settings tab
|
||||||
o = s.tab('basic', _('Basic Settings'));
|
o = s.tab('basic', _('Basic Settings'));
|
||||||
|
|
||||||
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'));
|
||||||
@@ -44,7 +45,7 @@ return view.extend({
|
|||||||
console.error('Error fetching devices:', error);
|
console.error('Error fetching devices:', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
o = s.taboption('basic', form.Flag, 'domain_list_enabled', _('Predefined Domain Lists'), _('Enable routing based on predefined domain lists for specific regions'));
|
o = s.taboption('basic', form.Flag, 'domain_list_enabled', _('Predefined Domain Lists'), _('<a href="https://github.com/itdoginfo/allow-domains" target="_blank">github.com/itdoginfo/allow-domains</a>'));
|
||||||
o.default = '0';
|
o.default = '0';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
@@ -68,6 +69,7 @@ return view.extend({
|
|||||||
o.depends('subnets_list_enabled', '1');
|
o.depends('subnets_list_enabled', '1');
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
|
// User Settings tab
|
||||||
o = s.tab('custom', _('User Settings'));
|
o = s.tab('custom', _('User Settings'));
|
||||||
|
|
||||||
o = s.taboption('custom', form.Flag, 'custom_domains_list_enabled', _('User Domain List'), _('Enable and manage your custom list of domains for selective routing'));
|
o = s.taboption('custom', form.Flag, 'custom_domains_list_enabled', _('User Domain List'), _('Enable and manage your custom list of domains for selective routing'));
|
||||||
@@ -176,6 +178,7 @@ return view.extend({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Additional Settings tab
|
||||||
o = s.tab('additional', _('Additional Settings'));
|
o = s.tab('additional', _('Additional Settings'));
|
||||||
|
|
||||||
o = s.taboption('additional', form.Flag, 'delist_domains_enabled', _('Domain Exclusions'), _('Exclude specific domains from routing rules'));
|
o = s.taboption('additional', form.Flag, 'delist_domains_enabled', _('Domain Exclusions'), _('Exclude specific domains from routing rules'));
|
||||||
@@ -273,13 +276,14 @@ return view.extend({
|
|||||||
o.default = '0 4 * * *';
|
o.default = '0 4 * * *';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
o = s.tab('second_settings', _('Alternative Route'));
|
// Secondary Route tab
|
||||||
|
o = s.tab('second_settings', _('Secondary Route'));
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.Flag, 'second_enable', _('Alternative Route Enable'), _('Enable secondary routing configuration'));
|
o = s.taboption('second_settings', form.Flag, 'second_enable', _('Secondary Route Enable'), _('Enable secondary routing configuration'));
|
||||||
o.default = '0';
|
o.default = '0';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.ListValue, 'second_mode', _('Connection Type'), _('Select between VPN and Proxy for alternative route'));
|
o = s.taboption('second_settings', form.ListValue, 'second_mode', _('Connection Type'), _('Select between VPN and Proxy for secondary route'));
|
||||||
o.value('vpn', ('VPN'));
|
o.value('vpn', ('VPN'));
|
||||||
o.value('proxy', ('Proxy'));
|
o.value('proxy', ('Proxy'));
|
||||||
o.depends('second_enable', '1');
|
o.depends('second_enable', '1');
|
||||||
@@ -308,23 +312,23 @@ return view.extend({
|
|||||||
console.error('Error fetching devices:', error);
|
console.error('Error fetching devices:', error);
|
||||||
}
|
}
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.Flag, 'domain_service_enabled', _('Service List Enable'), _('Enable predefined service lists for alternative routing'));
|
o = s.taboption('second_settings', form.Flag, 'domain_service_enabled', _('Service Domain List Enable'), _('Enable predefined service domain lists for secondary routing'));
|
||||||
o.default = '0';
|
o.default = '0';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.depends('second_enable', '1');
|
o.depends('second_enable', '1');
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.ListValue, 'service_list', _('Service List'), _('Select predefined services for alternative routing'));
|
o = s.taboption('second_settings', form.ListValue, 'service_list', _('Service List'), _('Select predefined services for secondary routing'));
|
||||||
o.placeholder = 'placeholder';
|
o.placeholder = 'placeholder';
|
||||||
o.value('youtube', 'Youtube');
|
o.value('youtube', 'Youtube');
|
||||||
o.depends('domain_service_enabled', '1');
|
o.depends('domain_service_enabled', '1');
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.Flag, 'second_custom_domains_list_enabled', _('Alternative Domain List'), _('Configure custom domains for alternative routing path'));
|
o = s.taboption('second_settings', form.Flag, 'second_custom_domains_list_enabled', _('Secondary Domain List'), _('Configure custom domains for secondary routing path'));
|
||||||
o.default = '0';
|
o.default = '0';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.depends('second_enable', '1');
|
o.depends('second_enable', '1');
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.DynamicList, 'second_custom_domains', _('Alternative Domains'), _('Enter domain names without protocols (example: sub.example.com or example.com)'));
|
o = s.taboption('second_settings', form.DynamicList, 'second_custom_domains', _('Secondary Domains'), _('Enter domain names without protocols (example: sub.example.com or example.com)'));
|
||||||
o.placeholder = 'Domains list';
|
o.placeholder = 'Domains list';
|
||||||
o.depends('second_custom_domains_list_enabled', '1');
|
o.depends('second_custom_domains_list_enabled', '1');
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
@@ -341,12 +345,12 @@ return view.extend({
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.Flag, 'second_custom_subnets_list_enabled', _('Alternative Subnet List'), _('Configure custom subnets for alternative routing path'));
|
o = s.taboption('second_settings', form.Flag, 'second_custom_subnets_list_enabled', _('Secondary Subnet List'), _('Configure custom subnets for secondary routing path'));
|
||||||
o.default = '0';
|
o.default = '0';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.depends('second_enable', '1');
|
o.depends('second_enable', '1');
|
||||||
|
|
||||||
o = s.taboption('second_settings', form.DynamicList, 'second_custom_subnets', _('Alternative Subnets'), _('Enter subnet in CIDR notation (example: 192.168.1.0/24)'));
|
o = s.taboption('second_settings', form.DynamicList, 'second_custom_subnets', _('Secondary Subnets'), _('Enter subnet in CIDR notation (example: 192.168.1.0/24)'));
|
||||||
o.placeholder = 'Subnets list';
|
o.placeholder = 'Subnets list';
|
||||||
o.depends('second_custom_subnets_list_enabled', '1');
|
o.depends('second_custom_subnets_list_enabled', '1');
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ msgstr "Выберите сетевой интерфейс для VPN подкл
|
|||||||
msgid "Predefined Domain Lists"
|
msgid "Predefined Domain Lists"
|
||||||
msgstr "Предустановленные списки доменов"
|
msgstr "Предустановленные списки доменов"
|
||||||
|
|
||||||
msgid "Enable routing based on predefined domain lists for specific regions"
|
|
||||||
msgstr "Включить маршрутизацию на основе предустановленных списков доменов для определенных регионов"
|
|
||||||
|
|
||||||
msgid "Domain List"
|
msgid "Domain List"
|
||||||
msgstr "Список доменов"
|
msgstr "Список доменов"
|
||||||
|
|
||||||
@@ -175,44 +172,44 @@ msgstr "Исключить NTP"
|
|||||||
msgid "For issues with open connections sing-box"
|
msgid "For issues with open connections sing-box"
|
||||||
msgstr "Для проблем с открытыми соединениями sing-box"
|
msgstr "Для проблем с открытыми соединениями sing-box"
|
||||||
|
|
||||||
msgid "Alternative Route"
|
msgid "Secondary Route"
|
||||||
msgstr "Альтернативный маршрут"
|
msgstr "Вторичный маршрут"
|
||||||
|
|
||||||
msgid "Alternative Route Enable"
|
msgid "Secondary Route Enable"
|
||||||
msgstr "Включить альтернативный маршрут"
|
msgstr "Включить вторичный маршрут"
|
||||||
|
|
||||||
msgid "Enable secondary routing configuration"
|
msgid "Enable secondary routing configuration"
|
||||||
msgstr "Включить вторичную конфигурацию маршрутизации"
|
msgstr "Включить вторичную конфигурацию маршрутизации"
|
||||||
|
|
||||||
msgid "Service List Enable"
|
msgid "Service Domain List Enable"
|
||||||
msgstr "Включить список сервисов"
|
msgstr "Включить список доменов сервисов"
|
||||||
|
|
||||||
msgid "Enable predefined service lists for alternative routing"
|
msgid "Enable predefined service domain lists for secondary routing"
|
||||||
msgstr "Включить предустановленные списки сервисов для альтернативной маршрутизации"
|
msgstr "Включить предустановленные списки доменов сервисов для вторичной маршрутизации"
|
||||||
|
|
||||||
msgid "Service List"
|
msgid "Service List"
|
||||||
msgstr "Список сервисов"
|
msgstr "Список сервисов"
|
||||||
|
|
||||||
msgid "Select predefined services for alternative routing"
|
msgid "Select predefined services for secondary routing"
|
||||||
msgstr "Выберите предустановленные сервисы для альтернативной маршрутизации"
|
msgstr "Выберите предустановленные сервисы для вторичной маршрутизации"
|
||||||
|
|
||||||
msgid "Alternative Domain List"
|
msgid "Secondary Domain List"
|
||||||
msgstr "Альтернативный список доменов"
|
msgstr "Вторичный список доменов"
|
||||||
|
|
||||||
msgid "Configure custom domains for alternative routing path"
|
msgid "Configure custom domains for secondary routing path"
|
||||||
msgstr "Настройте пользовательские домены для альтернативного маршрута"
|
msgstr "Настройте пользовательские домены для вторичного маршрута"
|
||||||
|
|
||||||
msgid "Alternative Domains"
|
msgid "Secondary Domains"
|
||||||
msgstr "Альтернативные домены"
|
msgstr "Вторичные домены"
|
||||||
|
|
||||||
msgid "Alternative Subnet List"
|
msgid "Secondary Subnet List"
|
||||||
msgstr "Альтернативный список подсетей"
|
msgstr "Вторичный список подсетей"
|
||||||
|
|
||||||
msgid "Configure custom subnets for alternative routing path"
|
msgid "Configure custom subnets for secondary routing path"
|
||||||
msgstr "Настройте пользовательские подсети для альтернативного маршрута"
|
msgstr "Настройте пользовательские подсети для вторичного маршрута"
|
||||||
|
|
||||||
msgid "Alternative Subnets"
|
msgid "Secondary Subnets"
|
||||||
msgstr "Альтернативные подсети"
|
msgstr "Вторичные подсети"
|
||||||
|
|
||||||
msgid "Invalid domain format. Enter domain without protocol (example: sub.example.com)"
|
msgid "Invalid domain format. Enter domain without protocol (example: sub.example.com)"
|
||||||
msgstr "Неверный формат домена. Введите домен без протокола (пример: sub.example.com)"
|
msgstr "Неверный формат домена. Введите домен без протокола (пример: sub.example.com)"
|
||||||
|
|||||||
@@ -33,6 +33,102 @@ msgstr ""
|
|||||||
msgid "Select network interface for VPN connection"
|
msgid "Select network interface for VPN connection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Predefined Domain Lists"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Domain List"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Select a predefined domain list"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Predefined Service Networks"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Enable routing for popular services like Twitter, Meta, and Discord"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Service Networks"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Select predefined service networks for routing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "User Settings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Secondary Route"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Secondary Route Enable"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Enable secondary routing configuration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Service Domain List Enable"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Enable predefined service domain lists for secondary routing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Service List"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Select predefined services for secondary routing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Secondary Domain List"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Configure custom domains for secondary routing path"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Secondary Domains"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Secondary Subnet List"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Configure custom subnets for secondary routing path"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Secondary Subnets"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Additional Settings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Domain Exclusions"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
|
msgid "Excluded Domains"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "List Update Frequency"
|
msgid "List Update Frequency"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -74,43 +170,23 @@ msgid "Once a week on Monday at 04:00"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Predefined Domain Lists"
|
msgid "Yacd enable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Enable routing based on predefined domain lists for specific regions"
|
msgid "Mixed enable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Domain List"
|
msgid "Browser port: 2080"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Select a predefined domain list"
|
msgid "Exclude NTP"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Predefined Service Networks"
|
msgid "For issues with open connections sing-box"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
|
||||||
msgid "Enable routing for popular services like Twitter, Meta, and Discord"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
|
||||||
msgid "User Settings"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
|
||||||
msgid "Alternative Route"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
|
||||||
msgid "Alternative Route Enable"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
|
||||||
msgid "Enable secondary routing configuration"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
@@ -130,21 +206,13 @@ msgid "Invalid subnet format. Use format: X.X.X.X/Y (like 192.168.1.0/24)"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Yacd enable"
|
msgid "IP address parts must be between 0 and 255"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Mixed enable"
|
msgid "CIDR must be between 0 and 32"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
||||||
msgid "Browser port: 2080"
|
msgid "Invalid IP format. Use format: X.X.X.X (like 192.168.1.1)"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
|
||||||
msgid "Exclude NTP"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: applications/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js:0
|
|
||||||
msgid "For issues with open connections sing-box"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -35,9 +35,9 @@ start_service() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
config_get_bool second_enable "second" "second_enable" "0"
|
config_get_bool second_enable "second" "second_enable" "0"
|
||||||
config_get mode "second" "mode" "0"
|
config_get second_mode "second" "second_mode" "0"
|
||||||
if [ "$second_enable" -eq "1" ] && [ "$mode" = "proxy" ]; then
|
if [ "$second_enable" -eq "1" ] && [ "$second_mode" = "proxy" ]; then
|
||||||
config_get proxy_string second "proxy_string"
|
config_get proxy_string "second" "second_proxy_string"
|
||||||
if [[ "$proxy_string" =~ ^ss:// ]]; then
|
if [[ "$proxy_string" =~ ^ss:// ]]; then
|
||||||
sing_box_config_shadowsocks "$proxy_string" "1603"
|
sing_box_config_shadowsocks "$proxy_string" "1603"
|
||||||
elif [[ "$proxy_string" =~ ^vless:// ]]; then
|
elif [[ "$proxy_string" =~ ^vless:// ]]; then
|
||||||
@@ -53,9 +53,9 @@ start_service() {
|
|||||||
/etc/init.d/sing-box enable
|
/etc/init.d/sing-box enable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$second_enable" -eq "1" ] && [ "$mode" = "vpn" ]; then
|
if [ "$second_enable" -eq "1" ] && [ "$second_mode" = "vpn" ]; then
|
||||||
log "VPN mode for second"
|
log "VPN mode for second"
|
||||||
config_get interface "second" "interface" "0"
|
config_get interface "second" "second_interface" "0"
|
||||||
if [ -n "$interface" ]; then
|
if [ -n "$interface" ]; then
|
||||||
add_route_interface "$interface" "podkop2"
|
add_route_interface "$interface" "podkop2"
|
||||||
else
|
else
|
||||||
@@ -72,8 +72,8 @@ start_service() {
|
|||||||
|
|
||||||
# Main - proxy, Second - proxy
|
# Main - proxy, Second - proxy
|
||||||
config_get_bool second_enable "second" "second_enable" "0"
|
config_get_bool second_enable "second" "second_enable" "0"
|
||||||
config_get mode "second" "mode" "0"
|
config_get second_mode "second" "second_mode" "0"
|
||||||
if [ "$second_enable" -eq "1" ] && [ "$mode" = "proxy" ]; then
|
if [ "$second_enable" -eq "1" ] && [ "$second_mode" = "proxy" ]; then
|
||||||
log "Two proxy enable"
|
log "Two proxy enable"
|
||||||
outbound_main=$(mktemp)
|
outbound_main=$(mktemp)
|
||||||
outbound_second=$(mktemp)
|
outbound_second=$(mktemp)
|
||||||
@@ -88,7 +88,7 @@ start_service() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
config_get proxy_string second "proxy_string"
|
config_get proxy_string "second" "second_proxy_string"
|
||||||
if [[ "$proxy_string" =~ ^ss:// ]]; then
|
if [[ "$proxy_string" =~ ^ss:// ]]; then
|
||||||
sing_box_config_outbound_shadowsocks "$proxy_string" "$outbound_second" second
|
sing_box_config_outbound_shadowsocks "$proxy_string" "$outbound_second" second
|
||||||
elif [[ "$proxy_string" =~ ^vless:// ]]; then
|
elif [[ "$proxy_string" =~ ^vless:// ]]; then
|
||||||
@@ -109,8 +109,8 @@ start_service() {
|
|||||||
|
|
||||||
# Main proxy, second disable/vpn
|
# Main proxy, second disable/vpn
|
||||||
config_get_bool second_enable "second" "second_enable" "0"
|
config_get_bool second_enable "second" "second_enable" "0"
|
||||||
config_get mode "second" "mode" "0"
|
config_get second_mode "second" "second_mode" "0"
|
||||||
if [ "$second_enable" -eq "0" ] || [ "$mode" = "vpn" ]; then
|
if [ "$second_enable" -eq "0" ] || [ "$second_mode" = "vpn" ]; then
|
||||||
config_get proxy_string main "proxy_string"
|
config_get proxy_string main "proxy_string"
|
||||||
if [[ "$proxy_string" =~ ^ss:// ]]; then
|
if [[ "$proxy_string" =~ ^ss:// ]]; then
|
||||||
sing_box_config_shadowsocks "$proxy_string" "1602"
|
sing_box_config_shadowsocks "$proxy_string" "1602"
|
||||||
@@ -130,11 +130,11 @@ start_service() {
|
|||||||
|
|
||||||
# Main proxy, Second VPN
|
# Main proxy, Second VPN
|
||||||
config_get_bool second_enable "second" "second_enable" "0"
|
config_get_bool second_enable "second" "second_enable" "0"
|
||||||
config_get mode "second" "mode" "0"
|
config_get second_mode "second" "second_mode" "0"
|
||||||
if [ "$second_enable" -eq "1" ] && [ "$mode" = "vpn" ]; then
|
if [ "$second_enable" -eq "1" ] && [ "$second_mode" = "vpn" ]; then
|
||||||
log "VPN mode for seconds"
|
log "VPN mode for seconds"
|
||||||
log "You are using VPN mode, make sure you have installed all the necessary packages, configured, created the zone and forwarding."
|
log "You are using VPN mode, make sure you have installed all the necessary packages, configured, created the zone and forwarding."
|
||||||
config_get interface "second" "interface" "0"
|
config_get interface "second" "second_interface" "0"
|
||||||
if [ -n "$interface" ]; then
|
if [ -n "$interface" ]; then
|
||||||
add_route_interface "$interface" "podkop2"
|
add_route_interface "$interface" "podkop2"
|
||||||
else
|
else
|
||||||
@@ -225,7 +225,7 @@ stop_service() {
|
|||||||
|
|
||||||
log "Stop sing-box"
|
log "Stop sing-box"
|
||||||
config_get mode_main "main" "mode" "0"
|
config_get mode_main "main" "mode" "0"
|
||||||
config_get mode_second "second" "mode" "0"
|
config_get mode_second "second" "second_mode" "0"
|
||||||
|
|
||||||
if [ "$mode_main" = "proxy" ] || [ "$mode_second" = "proxy" ]; then
|
if [ "$mode_main" = "proxy" ] || [ "$mode_second" = "proxy" ]; then
|
||||||
/etc/init.d/sing-box stop
|
/etc/init.d/sing-box stop
|
||||||
@@ -396,7 +396,11 @@ add_set() {
|
|||||||
log "Create set $set_name"
|
log "Create set $set_name"
|
||||||
nft add chain inet PodkopTable mangle { type filter hook prerouting priority -150 \; policy accept \;}
|
nft add chain inet PodkopTable mangle { type filter hook prerouting priority -150 \; policy accept \;}
|
||||||
nft add set inet PodkopTable "$set_name" { type ipv4_addr\; flags interval\; auto-merge\; }
|
nft add set inet PodkopTable "$set_name" { type ipv4_addr\; flags interval\; auto-merge\; }
|
||||||
config_get mode "$connect" "mode"
|
if [ "$connect" = "main" ]; then
|
||||||
|
config_get mode "$connect" "mode"
|
||||||
|
else
|
||||||
|
config_get mode "$connect" "second_mode"
|
||||||
|
fi
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
"vpn")
|
"vpn")
|
||||||
if ! nft list chain inet PodkopTable mangle | grep -q "ip daddr @"$set_name" meta mark set"; then
|
if ! nft list chain inet PodkopTable mangle | grep -q "ip daddr @"$set_name" meta mark set"; then
|
||||||
@@ -537,8 +541,11 @@ lists_domains_download() {
|
|||||||
while true; do
|
while true; do
|
||||||
if curl -m 3 github.com; then
|
if curl -m 3 github.com; then
|
||||||
curl -f $URL --output /tmp/dnsmasq.d/podkop-domains.lst
|
curl -f $URL --output /tmp/dnsmasq.d/podkop-domains.lst
|
||||||
sed -i 's/fw4#vpn_domains/PodkopTable#podkop_domains/g' /tmp/dnsmasq.d/podkop-domains.lst
|
if [ "$connect" = "second" ]; then
|
||||||
return 0
|
sed -i 's/fw4#vpn_domains/PodkopTable#podkop2_domains/g' /tmp/dnsmasq.d/podkop-domains.lst
|
||||||
|
else
|
||||||
|
sed -i 's/fw4#vpn_domains/PodkopTable#podkop_domains/g' /tmp/dnsmasq.d/podkop-domains.lst
|
||||||
|
fi return 0
|
||||||
else
|
else
|
||||||
log "GitHub is not available. Check the internet availability [$count sec]"
|
log "GitHub is not available. Check the internet availability [$count sec]"
|
||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
|
|||||||
Reference in New Issue
Block a user