From cfbdae7abbf15ac097b86e5875f2621ad1db74b1 Mon Sep 17 00:00:00 2001 From: Paul Dee Date: Wed, 24 May 2023 12:02:07 +0200 Subject: [PATCH] Follow-up fix for fwmark 101b5564c267e673afdea97e24a6bd778939abd8 (#372) Remove all FwMark settings from client configs (illegal) and QRcode (also illegal). --- handler/routes.go | 3 --- model/client.go | 1 - templates/clients.html | 6 +----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/handler/routes.go b/handler/routes.go index d43d75f..e443af9 100644 --- a/handler/routes.go +++ b/handler/routes.go @@ -357,11 +357,9 @@ func GetClient(db store.IStore) echo.HandlerFunc { return func(c echo.Context) error { clientID := c.Param("id") - qrCodeIncludeFwMark := c.QueryParam("qrCodeIncludeFwMark") qrCodeSettings := model.QRCodeSettings{ Enabled: true, IncludeDNS: true, - IncludeFwMark: qrCodeIncludeFwMark == "true", IncludeMTU: true, } @@ -490,7 +488,6 @@ func EmailClient(db store.IStore, mailer emailer.Emailer, emailSubject, emailCon qrCodeSettings := model.QRCodeSettings{ Enabled: true, IncludeDNS: true, - IncludeFwMark: true, IncludeMTU: true, } clientData, err := db.GetClientByID(payload.ID, qrCodeSettings) diff --git a/model/client.go b/model/client.go index 7a4cb41..be5fa76 100644 --- a/model/client.go +++ b/model/client.go @@ -30,6 +30,5 @@ type ClientData struct { type QRCodeSettings struct { Enabled bool IncludeDNS bool - IncludeFwMark bool IncludeMTU bool } diff --git a/templates/clients.html b/templates/clients.html index 0fa98f7..94ab634 100644 --- a/templates/clients.html +++ b/templates/clients.html @@ -472,17 +472,13 @@ Wireguard Clients const client_id = $("#qr_client_id").val(); const QRCodeImg = $("#qr_code"); const QRCodeA = $("#qr_code_a"); - let include_fwmark = false; - if ($("#qr_include_fwmark").is(':checked')){ - include_fwmark = true; - } QRCodeImg.hide(); $.ajax({ cache: false, method: 'GET', url: '{{.basePath}}/api/client/' + client_id, data: { - qrCodeIncludeFwMark: include_fwmark + }, dataType: 'json', contentType: "application/json",