experimenting...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2024-01-15 21:38:50 +03:00
parent f2e160acc4
commit 31dbf3acd2

View File

@ -60,7 +60,6 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
-e 's/\$${\CLIENT_PRIVATE_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id")'/g' \
-e 's/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \
> "$(CLIENT_DIR)/$*.conf"
ln -s "$(CLIENT_DIR)/$*.conf" $*.client
cat "$(SERVER_CLIENT_TPL)" \
| sed \
-e 's/\$${\CLIENT_IP}/$(shell ./getFreeClientIP)\/32/g' \
@ -69,7 +68,10 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
-e 's/\$${\CLIENT_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id.pub")'/g' \
-e 's/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \
>> "$(SERVER_CONF)"
make update
make update $*.show
%.show: $(CLIENT_DIR)/%.conf
@ [ "$(QRCODE)" == "1" ] \
&& ( echo "# Profile: $*" \
&& qrencode -t UTF8 -r "$(CLIENT_DIR)/$*.conf" )
@ -77,12 +79,6 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
@ echo
%.qr: %.conf
@ ( echo "# Profile: $*" \
&& qrencode -t UTF8 -r "$*.conf" )
update:
wg syncconf $(INTERFACE) <(wg-quick strip $(INTERFACE))