Skip to content

Commit

Permalink
Update wg_server
Browse files Browse the repository at this point in the history
CHANGE: Allow use of  'MTU ='  in .conf to override 1420 default - SNB Forums member @bearnet
  • Loading branch information
MartineauUK committed Feb 12, 2022
1 parent 891366f commit f15fbd7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wg_server
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ if [ "$2" != "disable" ];then
cmd ip -6 link set up dev $VPN_ID
fi

cmd ifconfig $VPN_ID mtu 1420 # v1.02
MTU=$(awk '/^MTU/ {print $3}' ${CONFIG_DIR}${VPN_ID}.conf) # v4.15.5
[ -z "$MTU" ] && cmd ifconfig $VPN_ID mtu 1420 || cmd ifconfig $VPN_ID mtu 1420 # v4.15.5 v1.02

TIMESTAMP=$(date +%s)
sqlite3 $SQL_DATABASE "INSERT into session values('$WG_INTERFACE','Start','$TIMESTAMP');" # v1.13
Expand Down

0 comments on commit f15fbd7

Please sign in to comment.