summaryrefslogtreecommitdiff
path: root/pkg/vpn/launcher.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-11-30 18:49:00 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-11-30 21:22:45 +0100
commit52206cc7dda3d12d92dad3181e27b680c70e69e3 (patch)
treea28f33a102f2d703a622b9f332e98c913e3d3095 /pkg/vpn/launcher.go
parent0419a17814fba437e111d0335fb05a9806f9589f (diff)
[feat] udp nameservers
Diffstat (limited to 'pkg/vpn/launcher.go')
-rw-r--r--pkg/vpn/launcher.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/vpn/launcher.go b/pkg/vpn/launcher.go
index 1b2d673..f6e08eb 100644
--- a/pkg/vpn/launcher.go
+++ b/pkg/vpn/launcher.go
@@ -24,6 +24,7 @@ import (
"io/ioutil"
"log"
"net/http"
+ "os"
"strconv"
"strings"
"time"
@@ -115,7 +116,11 @@ func (l *launcher) firewallStart(gateways []bonafide.Gateway) error {
if err != nil {
return err
}
- return l.send("/firewall/start", byteIPs)
+ uri := "/firewall/start"
+ if os.Getenv("UDP") == "1" {
+ uri = uri + "?udp=1"
+ }
+ return l.send(uri, byteIPs)
}
func (l *launcher) firewallStop() error {