diff --git a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js index ac7d235..af18360 100644 --- a/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js +++ b/luci-app-podkop/htdocs/luci-static/resources/view/podkop/podkop.js @@ -17,18 +17,6 @@ return view.extend({ m = new form.Map('podkop', _('Podkop configuration'), null, ['main', 'second']); - m = new form.Map('podkop', _('Podkop'), null, ['main', 'second']); - L.uci.load('podkop').then(() => { - const version = L.uci.get('podkop', 'main', 'version') || ''; - if (version) { - m.title = _('Podkop') + ' v' + version; - if (!window.location.search.includes('v=')) { - const newUrl = window.location.pathname + '?v=' + version; - window.history.replaceState(null, '', newUrl); - } - } - }); - s = m.section(form.TypedSection, 'main'); s.anonymous = true; diff --git a/podkop/files/etc/config/podkop b/podkop/files/etc/config/podkop index 8c86dfe..0976aa8 100644 --- a/podkop/files/etc/config/podkop +++ b/podkop/files/etc/config/podkop @@ -1,5 +1,4 @@ config main 'main' - option version '0.3.3' option mode 'proxy' #option interface '' option proxy_config_type '' diff --git a/podkop/files/etc/init.d/podkop b/podkop/files/etc/init.d/podkop index b73b9fe..7e885d1 100755 --- a/podkop/files/etc/init.d/podkop +++ b/podkop/files/etc/init.d/podkop @@ -7,7 +7,7 @@ script=$(readlink "$initscript") NAME="$(basename ${script:-$initscript})" config_load "$NAME" -EXTRA_COMMANDS="list_update check_proxy check_nft check_github check_logs check_all check_three main show_config" +EXTRA_COMMANDS="list_update check_proxy check_nft check_github check_logs check_all check_three main show_config show_version" EXTRA_HELP=" list_update Updating domain and subnet lists sing_box_config_vless For test vless string check_proxy Check if sing-box proxy works correctly @@ -17,7 +17,8 @@ EXTRA_HELP=" list_update Updating domain and subnet lists check_all Run all checks check_three Run check_proxy, check_nft and check_github main Main function - show_config Show current configuration with masked sensitive data" + show_config Show current configuration with masked sensitive data + show_version Show current version" [ ! -L /usr/sbin/podkop ] && ln -s /etc/init.d/podkop /usr/sbin/podkop @@ -1082,7 +1083,7 @@ sing_box_rules() { local rule_set="$1" local outbound="$2" - # 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") if [[ -n "$rule_exists" ]]; then @@ -1447,3 +1448,8 @@ show_config() { cat "$tmp_config" rm -f "$tmp_config" } + +show_version() { + local version=$(opkg info podkop | grep -m 1 "Version:" | cut -d' ' -f2) + echo "$version" +} \ No newline at end of file