Commit c1bd148 1 parent a707938 commit c1bd148 Copy full SHA for c1bd148
File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ From 0dee551ff51ea6721858ee5fe4d58b48b6b1827a Mon Sep 17 00:00:00 2001
2
+ From: Kir_Antipov <kp.antipov@gmail.com>
3
+ Date: Sun, 16 Mar 2024 17:28:49 +0000
4
+ Subject: [PATCH] Added a way to specify a custom DNS resolver
5
+
6
+ See Jigsaw-Code/outline-apps#568
7
+ ---
8
+ x/examples/outline-cli/main.go | 8 ++++++++
9
+ 1 file changed, 8 insertions(+)
10
+
11
+ diff --git a/x/examples/outline-cli/main.go b/x/examples/outline-cli/main.go
12
+ index 1be0096..82501c4 100644
13
+ --- a/x/examples/outline-cli/main.go
14
+ +++ b/x/examples/outline-cli/main.go
15
+ @@ -19,6 +19,7 @@ import (
16
+ "fmt"
17
+ "io"
18
+ "log"
19
+ + "net/url"
20
+ "os"
21
+ )
22
+
23
+ @@ -49,6 +50,13 @@ func main() {
24
+ }
25
+ flag.Parse()
26
+
27
+ + if transportUrl, _ := url.Parse(*app.TransportConfig); transportUrl != nil {
28
+ + if dns := transportUrl.Query().Get("dns"); dns != "" {
29
+ + app.RoutingConfig.DNSServerIP = dns
30
+ + }
31
+ + }
32
+ + logging.Info.Printf("updated system DNS resolver: %v\n", app.RoutingConfig.DNSServerIP)
33
+ +
34
+ if err := app.Run(); err != nil {
35
+ logging.Err.Printf("%v\n", err)
36
+ }
37
+ - -
38
+ 2.44.0
You can’t perform that action at this time.
0 commit comments