mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-08-28 15:51:17 +00:00
Working on isolated peers feature.
This commit is contained in:
@@ -19,8 +19,20 @@ start_core() {
|
||||
cd ${WGDASH}/app/src
|
||||
bash wgd.sh start
|
||||
|
||||
echo "${isolated_peers}"
|
||||
if [ "${isolated_peers,,}" == "false" ]; then
|
||||
echo "Isolated peers disabled, adjusting."
|
||||
|
||||
sed -i '/^.*FORWARD -i wg0 -o wg0 -j DROP.*$/s/^/#/' /etc/wireguard/wg0.conf
|
||||
elif [ "${isolated_peers,,}" == "true" ]; then
|
||||
echo "Isolated peers enabled, adjusting."
|
||||
|
||||
sed -i 's/^#//' /etc/wireguard/wg0.conf
|
||||
fi
|
||||
|
||||
if [ "${enable_wg0,,}" == "true" ]; then
|
||||
echo "Preference for wg0 to be turned on found."
|
||||
|
||||
wg-quick up wg0
|
||||
else
|
||||
echo "Preference for wg0 to be turned off found."
|
||||
|
Reference in New Issue
Block a user