mirror of
https://github.com/teddysun/across.git
synced 2025-01-18 22:09: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})
|
||||
done
|
||||
# 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)
|
||||
last_ip=$(echo ${client_ipv4_sorted[$index]} | cut -d. -f4)
|
||||
issue_ip_last=$(expr ${last_ip} + 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user