mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-04-19 19:59:13 +03:00
Follow-up fix for fwmark 101b5564c2
(#372)
Remove all FwMark settings from client configs (illegal) and QRcode (also illegal).
This commit is contained in:
parent
ac99317ba3
commit
cfbdae7abb
3 changed files with 1 additions and 9 deletions
|
@ -357,11 +357,9 @@ func GetClient(db store.IStore) echo.HandlerFunc {
|
||||||
return func(c echo.Context) error {
|
return func(c echo.Context) error {
|
||||||
|
|
||||||
clientID := c.Param("id")
|
clientID := c.Param("id")
|
||||||
qrCodeIncludeFwMark := c.QueryParam("qrCodeIncludeFwMark")
|
|
||||||
qrCodeSettings := model.QRCodeSettings{
|
qrCodeSettings := model.QRCodeSettings{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
IncludeDNS: true,
|
IncludeDNS: true,
|
||||||
IncludeFwMark: qrCodeIncludeFwMark == "true",
|
|
||||||
IncludeMTU: true,
|
IncludeMTU: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +488,6 @@ func EmailClient(db store.IStore, mailer emailer.Emailer, emailSubject, emailCon
|
||||||
qrCodeSettings := model.QRCodeSettings{
|
qrCodeSettings := model.QRCodeSettings{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
IncludeDNS: true,
|
IncludeDNS: true,
|
||||||
IncludeFwMark: true,
|
|
||||||
IncludeMTU: true,
|
IncludeMTU: true,
|
||||||
}
|
}
|
||||||
clientData, err := db.GetClientByID(payload.ID, qrCodeSettings)
|
clientData, err := db.GetClientByID(payload.ID, qrCodeSettings)
|
||||||
|
|
|
@ -30,6 +30,5 @@ type ClientData struct {
|
||||||
type QRCodeSettings struct {
|
type QRCodeSettings struct {
|
||||||
Enabled bool
|
Enabled bool
|
||||||
IncludeDNS bool
|
IncludeDNS bool
|
||||||
IncludeFwMark bool
|
|
||||||
IncludeMTU bool
|
IncludeMTU bool
|
||||||
}
|
}
|
||||||
|
|
|
@ -472,17 +472,13 @@ Wireguard Clients
|
||||||
const client_id = $("#qr_client_id").val();
|
const client_id = $("#qr_client_id").val();
|
||||||
const QRCodeImg = $("#qr_code");
|
const QRCodeImg = $("#qr_code");
|
||||||
const QRCodeA = $("#qr_code_a");
|
const QRCodeA = $("#qr_code_a");
|
||||||
let include_fwmark = false;
|
|
||||||
if ($("#qr_include_fwmark").is(':checked')){
|
|
||||||
include_fwmark = true;
|
|
||||||
}
|
|
||||||
QRCodeImg.hide();
|
QRCodeImg.hide();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
cache: false,
|
cache: false,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '{{.basePath}}/api/client/' + client_id,
|
url: '{{.basePath}}/api/client/' + client_id,
|
||||||
data: {
|
data: {
|
||||||
qrCodeIncludeFwMark: include_fwmark
|
|
||||||
},
|
},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
|
|
Loading…
Add table
Reference in a new issue