Skip to content

Commit

Permalink
linux: fix setting bind on non-tun mode
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Pashmfouroush <[email protected]>
  • Loading branch information
markpash committed May 21, 2024
1 parent 0a21d52 commit e534347
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/tun_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build windows

package app

import (
Expand Down
2 changes: 1 addition & 1 deletion app/wg.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func establishWireguard(l *slog.Logger, conf *wiresocks.Configuration, tunDev wg
var request bytes.Buffer

request.WriteString(fmt.Sprintf("private_key=%s\n", conf.Interface.PrivateKey))
if fwmark != 0 {
if bind && fwmark != 0 {
request.WriteString(fmt.Sprintf("fwmark=%d\n", fwmark))
}

Expand Down

0 comments on commit e534347

Please sign in to comment.