mirror of
https://github.com/teddysun/across.git
synced 2025-01-31 12:19:35 +08:00
Update wireguard.sh
This commit is contained in:
parent
e94384875c
commit
e983894e93
@ -521,7 +521,7 @@ add_client() {
|
|||||||
client_ipv6=(${client_ipv6[@]} ${tmp_ipv6})
|
client_ipv6=(${client_ipv6[@]} ${tmp_ipv6})
|
||||||
done
|
done
|
||||||
# Sort array
|
# Sort array
|
||||||
client_ipv4_sorted=($(printf '%s\n' "${client_ipv4[@]}" | sort))
|
client_ipv4_sorted=($(printf '%s\n' "${client_ipv4[@]}" | sort -V))
|
||||||
index=$(expr ${#client_ipv4[@]} - 1)
|
index=$(expr ${#client_ipv4[@]} - 1)
|
||||||
last_ip=$(echo ${client_ipv4_sorted[$index]} | cut -d. -f4)
|
last_ip=$(echo ${client_ipv4_sorted[$index]} | cut -d. -f4)
|
||||||
issue_ip_last=$(expr ${last_ip} + 1)
|
issue_ip_last=$(expr ${last_ip} + 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user