fix
This commit is contained in:
parent
27b9b5f693
commit
69aa365e2a
1 changed files with 4 additions and 3 deletions
7
bypasser
7
bypasser
|
|
@ -7,7 +7,7 @@ BP_WG_DEFAULT_MIN_PORT="${BP_WG_DEFAULT_MIN_PORT:-55107}"
|
|||
BP_WG_DEFAULT_MAX_PORT="${BP_WG_DEFAULT_MAX_PORT:-55207}"
|
||||
BG_WG_SUBNET_PREFIX="69.0"
|
||||
BG_WG_INTERFACE_SUBNET_MASK="24"
|
||||
BG_WG_PEER_SUBNET_MASK="32"
|
||||
BG_WG_PEER_SUBNET_MASK="24"
|
||||
_IPV4_RULE="net.ipv4.ip_forward"
|
||||
_IPV6_RULE="net.ipv6.conf.all.forwarding"
|
||||
|
||||
|
|
@ -220,8 +220,9 @@ _peer_rm() {
|
|||
_peer_name="${_peer_name##*:}"
|
||||
_peer_file="$BP_WG_PEERS_DIR"/"$BP_WG_INTERFACE_PREFIX$_vpn_name-$_peer_name".conf
|
||||
|
||||
if ! [ -f "$_peer_name" ]; then
|
||||
if ! [ -f "$_peer_file" ]; then
|
||||
echo "Error: peer file '$_peer_file' nonexistent"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -f "$_peer_file" ]; then
|
||||
|
|
@ -410,7 +411,7 @@ _peer_new() {
|
|||
echo "[Peer]
|
||||
PublicKey = ${_server_pub_key}
|
||||
PresharedKey = ${_peer_pre_key}
|
||||
AllowedIPs = ${BG_WG_SUBNET_PREFIX}.${_vpn_octet}.1/${BG_WG_PEER_SUBNET_MASK}
|
||||
AllowedIPs = ${BG_WG_SUBNET_PREFIX}.${_vpn_octet}.0/${BG_WG_PEER_SUBNET_MASK}
|
||||
Endpoint = ${_server_ipv4}:${_server_port}
|
||||
PersistentKeepalive = 25" >>"$_peer_file"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue