Skip to content

Commit cfbdae7

Browse files
authored
Follow-up fix for fwmark 101b556 (ngoduykhanh#372)
Remove all FwMark settings from client configs (illegal) and QRcode (also illegal).
1 parent ac99317 commit cfbdae7

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

Diff for: handler/routes.go

-3
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,9 @@ func GetClient(db store.IStore) echo.HandlerFunc {
357357
return func(c echo.Context) error {
358358

359359
clientID := c.Param("id")
360-
qrCodeIncludeFwMark := c.QueryParam("qrCodeIncludeFwMark")
361360
qrCodeSettings := model.QRCodeSettings{
362361
Enabled: true,
363362
IncludeDNS: true,
364-
IncludeFwMark: qrCodeIncludeFwMark == "true",
365363
IncludeMTU: true,
366364
}
367365

@@ -490,7 +488,6 @@ func EmailClient(db store.IStore, mailer emailer.Emailer, emailSubject, emailCon
490488
qrCodeSettings := model.QRCodeSettings{
491489
Enabled: true,
492490
IncludeDNS: true,
493-
IncludeFwMark: true,
494491
IncludeMTU: true,
495492
}
496493
clientData, err := db.GetClientByID(payload.ID, qrCodeSettings)

Diff for: model/client.go

-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@ type ClientData struct {
3030
type QRCodeSettings struct {
3131
Enabled bool
3232
IncludeDNS bool
33-
IncludeFwMark bool
3433
IncludeMTU bool
3534
}

Diff for: templates/clients.html

+1-5
Original file line numberDiff line numberDiff line change
@@ -472,17 +472,13 @@ <h4 class="modal-title">Remove</h4>
472472
const client_id = $("#qr_client_id").val();
473473
const QRCodeImg = $("#qr_code");
474474
const QRCodeA = $("#qr_code_a");
475-
let include_fwmark = false;
476-
if ($("#qr_include_fwmark").is(':checked')){
477-
include_fwmark = true;
478-
}
479475
QRCodeImg.hide();
480476
$.ajax({
481477
cache: false,
482478
method: 'GET',
483479
url: '{{.basePath}}/api/client/' + client_id,
484480
data: {
485-
qrCodeIncludeFwMark: include_fwmark
481+
486482
},
487483
dataType: 'json',
488484
contentType: "application/json",

0 commit comments

Comments
 (0)