mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-13 08:57:28 +02:00
[client] Avoid parsing NB_NETSTACK_SKIP_PROXY if empty (#4145)
Signed-off-by: iisteev <isteevan.shetoo@is-info.fr>
This commit is contained in:
@ -41,9 +41,12 @@ func (t *NetStackTun) Create() (tun.Device, *netstack.Net, error) {
|
|||||||
}
|
}
|
||||||
t.tundev = nsTunDev
|
t.tundev = nsTunDev
|
||||||
|
|
||||||
skipProxy, err := strconv.ParseBool(os.Getenv(EnvSkipProxy))
|
var skipProxy bool
|
||||||
if err != nil {
|
if val := os.Getenv(EnvSkipProxy); val != "" {
|
||||||
log.Errorf("failed to parse %s: %s", EnvSkipProxy, err)
|
skipProxy, err = strconv.ParseBool(val)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("failed to parse %s: %s", EnvSkipProxy, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if skipProxy {
|
if skipProxy {
|
||||||
return nsTunDev, tunNet, nil
|
return nsTunDev, tunNet, nil
|
||||||
|
Reference in New Issue
Block a user