feat: add sing-box configuration manager script and jq helpers
This commit is contained in:
14
podkop/files/usr/lib/helpers.jq
Normal file
14
podkop/files/usr/lib/helpers.jq
Normal file
@@ -0,0 +1,14 @@
|
||||
def extend_key_value(current_value; new_value):
|
||||
if (current_value | type) == "array" then
|
||||
if (new_value | type) == "array" then
|
||||
current_value + new_value
|
||||
else
|
||||
current_value + [new_value]
|
||||
end
|
||||
else
|
||||
if (new_value | type) == "array" then
|
||||
[current_value] + new_value
|
||||
else
|
||||
[current_value, new_value]
|
||||
end
|
||||
end;
|
||||
1207
podkop/files/usr/lib/sing_box_config_manager.sh
Normal file
1207
podkop/files/usr/lib/sing_box_config_manager.sh
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user