mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-26 07:08:11 +00:00
docs: replace 1.1.1.1 with 8.8.8.8 as default DNS server
This commit is contained in:
@@ -130,7 +130,7 @@ func TestValidate(t *testing.T) {
|
||||
Auth: "telemost",
|
||||
RoomID: "room-1",
|
||||
KeyHex: "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
|
||||
DNSServer: "1.1.1.1:53", //nolint:goconst // test literal, repetition is intentional
|
||||
DNSServer: "8.8.8.8:53", //nolint:goconst // test literal, repetition is intentional
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
@@ -577,17 +577,17 @@ func TestValidateGen(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "wbstream room generation unsupported",
|
||||
cfg: Config{Auth: testAuthWBStream, DNSServer: "1.1.1.1:53", Amount: 3},
|
||||
cfg: Config{Auth: testAuthWBStream, DNSServer: "8.8.8.8:53", Amount: 3},
|
||||
want: ErrUnsupportedCarrier,
|
||||
},
|
||||
{
|
||||
name: "missing auth",
|
||||
cfg: Config{DNSServer: "1.1.1.1:53", Amount: 1},
|
||||
cfg: Config{DNSServer: "8.8.8.8:53", Amount: 1},
|
||||
want: ErrAuthRequired,
|
||||
},
|
||||
{
|
||||
name: "unsupported auth",
|
||||
cfg: Config{Auth: "unknown", DNSServer: "1.1.1.1:53", Amount: 1},
|
||||
cfg: Config{Auth: "unknown", DNSServer: "8.8.8.8:53", Amount: 1},
|
||||
want: ErrUnsupportedCarrier,
|
||||
},
|
||||
{
|
||||
@@ -597,12 +597,12 @@ func TestValidateGen(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "amount zero",
|
||||
cfg: Config{Auth: testAuthWBStream, DNSServer: "1.1.1.1:53", Amount: 0},
|
||||
cfg: Config{Auth: testAuthWBStream, DNSServer: "8.8.8.8:53", Amount: 0},
|
||||
want: ErrAmountRequired,
|
||||
},
|
||||
{
|
||||
name: "amount negative",
|
||||
cfg: Config{Auth: testAuthWBStream, DNSServer: "1.1.1.1:53", Amount: -1},
|
||||
cfg: Config{Auth: testAuthWBStream, DNSServer: "8.8.8.8:53", Amount: -1},
|
||||
want: ErrAmountRequired,
|
||||
},
|
||||
}
|
||||
@@ -625,7 +625,7 @@ func TestValidateGen(t *testing.T) {
|
||||
|
||||
func TestGenUnsupportedAuth(t *testing.T) {
|
||||
RegisterDefaults()
|
||||
cfg := Config{Auth: "telemost", DNSServer: "1.1.1.1:53", Amount: 1}
|
||||
cfg := Config{Auth: "telemost", DNSServer: "8.8.8.8:53", Amount: 1}
|
||||
err := Gen(context.Background(), cfg, func(string) {})
|
||||
if !errors.Is(err, ErrUnsupportedCarrier) {
|
||||
t.Fatalf("Gen(telemost) error = %v, want ErrUnsupportedCarrier", err)
|
||||
|
||||
@@ -14,6 +14,7 @@ const (
|
||||
testAuthProvider = "wbstream"
|
||||
testRoomID = "r1"
|
||||
testCryptoKey = "deadbeef"
|
||||
testDNSServer = "8.8.8.8:53"
|
||||
)
|
||||
|
||||
func TestLoadAndApply(t *testing.T) {
|
||||
@@ -30,7 +31,7 @@ crypto:
|
||||
key: deadbeef
|
||||
net:
|
||||
transport: datachannel
|
||||
dns: 1.1.1.1:53
|
||||
dns: 8.8.8.8:53
|
||||
socks:
|
||||
host: 127.0.0.1
|
||||
port: 1080
|
||||
@@ -91,7 +92,7 @@ func requireAppliedConfig(t *testing.T, got session.Config) {
|
||||
RoomID: testRoomID,
|
||||
KeyHex: testCryptoKey,
|
||||
Transport: "datachannel",
|
||||
DNSServer: "1.1.1.1:53",
|
||||
DNSServer: testDNSServer,
|
||||
SOCKSHost: "127.0.0.1",
|
||||
SOCKSPort: 1080,
|
||||
SOCKSUser: "u",
|
||||
@@ -147,7 +148,7 @@ link: direct
|
||||
crypto:
|
||||
key: shared-key
|
||||
net:
|
||||
dns: 1.1.1.1:53
|
||||
dns: 8.8.8.8:53
|
||||
liveness:
|
||||
interval: 5s
|
||||
timeout: 2s
|
||||
@@ -207,7 +208,7 @@ failover:
|
||||
if first.Auth != "wbstream" || first.Transport != "vp8channel" || first.RoomID != "wb-room" {
|
||||
t.Fatalf("first profile = %+v", first)
|
||||
}
|
||||
if first.KeyHex != "shared-key" || first.DNSServer != "1.1.1.1:53" || first.VP8.FPS != 30 ||
|
||||
if first.KeyHex != "shared-key" || first.DNSServer != testDNSServer || first.VP8.FPS != 30 ||
|
||||
first.LivenessInterval != "1s" || first.LivenessTimeout != "2s" || first.LivenessFailures != 5 ||
|
||||
first.MaxSessionDuration != "30m" || first.TrafficMaxPayloadSize != 4096 ||
|
||||
first.TrafficMinDelay != "10ms" || first.TrafficMaxDelay != "20ms" {
|
||||
@@ -215,7 +216,7 @@ failover:
|
||||
}
|
||||
second := ApplyProfile(base, f.Profiles[1])
|
||||
if second.Auth != "jitsi" || second.Transport != "datachannel" ||
|
||||
second.RoomID != "https://meet.example/room" || second.DNSServer != "8.8.8.8:53" {
|
||||
second.RoomID != "https://meet.example/room" || second.DNSServer != testDNSServer {
|
||||
t.Fatalf("second profile = %+v", second)
|
||||
}
|
||||
if second.LivenessInterval != "5s" || second.LivenessTimeout != "2s" || second.LivenessFailures != 5 ||
|
||||
|
||||
Reference in New Issue
Block a user