mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-23 07:09:08 +02:00
feature: initial implementation of avoiding local proxy if peers are in the same net
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
|
||||
const (
|
||||
defaultMTU = 1280
|
||||
WgPort = 51820
|
||||
)
|
||||
|
||||
// Saves tun device object - is it required?
|
||||
@@ -85,10 +86,12 @@ func Configure(iface string, privateKey string) error {
|
||||
return err
|
||||
}
|
||||
fwmark := 0
|
||||
p := WgPort
|
||||
cfg := wgtypes.Config{
|
||||
PrivateKey: &key,
|
||||
ReplacePeers: false,
|
||||
FirewallMark: &fwmark,
|
||||
ListenPort: &p,
|
||||
}
|
||||
err = wg.ConfigureDevice(iface, cfg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user