mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-08-20 00:53:18 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0a2736bb9 | ||
|
|
a4aa714372 | ||
|
|
a64923db5a | ||
|
|
0c99dddf11 |
@@ -2152,21 +2152,9 @@ check_sing_box() {
|
||||
# Check version (must be >= 1.12.4)
|
||||
local version
|
||||
version=$(sing-box version 2> /dev/null | head -n 1 | awk '{print $3}')
|
||||
if [ -n "$version" ]; then
|
||||
version=$(echo "$version" | sed 's/^v//')
|
||||
local major
|
||||
local minor
|
||||
local patch
|
||||
major=$(echo "$version" | cut -d. -f1)
|
||||
minor=$(echo "$version" | cut -d. -f2)
|
||||
patch=$(echo "$version" | cut -d. -f3)
|
||||
|
||||
# Compare version: must be >= 1.12.4
|
||||
if [ "$major" -gt 1 ] ||
|
||||
[ "$major" -eq 1 ] && [ "$minor" -gt 12 ] ||
|
||||
[ "$major" -eq 1 ] && [ "$minor" -eq 12 ] && [ "$patch" -ge 4 ]; then
|
||||
sing_box_version_ok=1
|
||||
fi
|
||||
version="${version#v}"
|
||||
if [ -n "$version" ] && is_min_package_version "$version" "1.12.4"; then
|
||||
sing_box_version_ok=1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ patch_source_ruleset_rules() {
|
||||
import_plain_domain_list_to_local_source_ruleset_chunked() {
|
||||
local plain_list_filepath="$1"
|
||||
local ruleset_filepath="$2"
|
||||
local chunk_size="${3:-5000}"
|
||||
local chunk_size="${3:-1000}"
|
||||
|
||||
local array count json_array
|
||||
count=0
|
||||
@@ -102,7 +102,7 @@ import_plain_domain_list_to_local_source_ruleset_chunked() {
|
||||
import_plain_subnet_list_to_local_source_ruleset_chunked() {
|
||||
local plain_list_filepath="$1"
|
||||
local ruleset_filepath="$2"
|
||||
local chunk_size="${3:-5000}"
|
||||
local chunk_size="${3:-1000}"
|
||||
|
||||
local array count json_array
|
||||
count=0
|
||||
|
||||
Reference in New Issue
Block a user