mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
all: implement split upstreams
This commit introduces split upstreams feature, allowing to configure what ip stack that ctrld will use to connect to upstream.
This commit is contained in:
committed by
Cuong Manh Le
parent
5cad0d6be1
commit
b267572b38
@@ -48,6 +48,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
BootstrapIP: "",
|
||||
Domain: "example.com",
|
||||
Timeout: 0,
|
||||
IPStack: IpStackBoth,
|
||||
u: u1,
|
||||
},
|
||||
},
|
||||
@@ -68,6 +69,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
BootstrapIP: "",
|
||||
Domain: "example.com",
|
||||
Timeout: 0,
|
||||
IPStack: IpStackBoth,
|
||||
u: u2,
|
||||
},
|
||||
},
|
||||
@@ -88,6 +90,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
BootstrapIP: "",
|
||||
Domain: "freedns.controld.com",
|
||||
Timeout: 0,
|
||||
IPStack: IpStackSplit,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -99,6 +102,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
BootstrapIP: "",
|
||||
Domain: "",
|
||||
Timeout: 0,
|
||||
IPStack: IpStackSplit,
|
||||
},
|
||||
&UpstreamConfig{
|
||||
Name: "dot",
|
||||
@@ -107,6 +111,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
BootstrapIP: "",
|
||||
Domain: "freedns.controld.com",
|
||||
Timeout: 0,
|
||||
IPStack: IpStackSplit,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -126,6 +131,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
BootstrapIP: "1.2.3.4",
|
||||
Domain: "1.2.3.4",
|
||||
Timeout: 0,
|
||||
IPStack: IpStackBoth,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -145,6 +151,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
BootstrapIP: "1.2.3.4",
|
||||
Domain: "1.2.3.4",
|
||||
Timeout: 0,
|
||||
IPStack: IpStackBoth,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -157,6 +164,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
Domain: "",
|
||||
Timeout: 0,
|
||||
SendClientInfo: ptrBool(false),
|
||||
IPStack: IpStackBoth,
|
||||
},
|
||||
&UpstreamConfig{
|
||||
Name: "doh",
|
||||
@@ -166,6 +174,7 @@ func TestUpstreamConfig_Init(t *testing.T) {
|
||||
Domain: "example.com",
|
||||
Timeout: 0,
|
||||
SendClientInfo: ptrBool(false),
|
||||
IPStack: IpStackBoth,
|
||||
u: u2,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user