docs: replace 1.1.1.1 with 8.8.8.8 as default DNS server

This commit is contained in:
zarazaex69
2026-05-21 19:01:10 +03:00
parent 0ec244e0dc
commit 9bf81248c4
16 changed files with 51 additions and 50 deletions

View File

@@ -45,7 +45,7 @@ ENV OLCRTC_MODE=srv \
OLCRTC_CARRIER= \
OLCRTC_TRANSPORT=datachannel \
OLCRTC_DATA_DIR=/usr/share/olcrtc \
OLCRTC_DNS=1.1.1.1:53 \
OLCRTC_DNS=8.8.8.8:53 \
OLCRTC_KEY_FILE=/var/lib/olcrtc/key.hex \
OLCRTC_SOCKS_HOST=127.0.0.1 \
OLCRTC_SOCKS_PORT=8808 \

View File

@@ -16,7 +16,7 @@ var errBoom = errors.New("boom")
const (
testAuthWBStream = "wbstream"
testDNSServer = "1.1.1.1:53"
testDNSServer = "8.8.8.8:53"
)
func writeYAML(t *testing.T, body string) string {
@@ -90,7 +90,7 @@ func TestRunWithConfigValidationAndDataDirErrors(t *testing.T) {
Auth: "jitsi",
RoomID: "https://meet.small-dm.ru/test",
KeyHex: "key",
DNSServer: "1.1.1.1:53",
DNSServer: "8.8.8.8:53",
}
if err := runWithConfig(loadedConfig{scfg: scfg}); !errors.Is(err, ErrDataDirRequired) {
t.Fatalf("runWithConfig(no data dir) = %v, want %v", err, ErrDataDirRequired)
@@ -140,7 +140,7 @@ crypto:
key: key
net:
transport: datachannel
dns: 1.1.1.1:53
dns: 8.8.8.8:53
data: `+dir+`
`)
@@ -181,7 +181,7 @@ crypto:
key: key
net:
transport: vp8channel
dns: 1.1.1.1:53
dns: 8.8.8.8:53
data: `+dir+`
`)
@@ -216,7 +216,7 @@ link: direct
crypto:
key: key
net:
dns: 1.1.1.1:53
dns: 8.8.8.8:53
profiles:
- name: wb-primary
auth:

View File

@@ -13,7 +13,7 @@ services:
OLCRTC_ROOM_ID: "${OLCRTC_ROOM_ID:?set OLCRTC_ROOM_ID to the server room}"
OLCRTC_KEY: "${OLCRTC_KEY:?set OLCRTC_KEY to the server encryption key}"
OLCRTC_KEY_FILE: "${OLCRTC_KEY_FILE:-/var/lib/olcrtc/key.hex}"
OLCRTC_DNS: "${OLCRTC_DNS:-1.1.1.1:53}"
OLCRTC_DNS: "${OLCRTC_DNS:-8.8.8.8:53}"
OLCRTC_SOCKS_HOST: "${OLCRTC_SOCKS_HOST:-127.0.0.1}"
OLCRTC_SOCKS_PORT: "${OLCRTC_SOCKS_PORT:-8808}"
OLCRTC_SOCKS_USER: "${OLCRTC_SOCKS_USER:-}"

View File

@@ -12,7 +12,7 @@ services:
OLCRTC_ROOM_ID: "${OLCRTC_ROOM_ID:-}"
OLCRTC_KEY: "${OLCRTC_KEY:-}"
OLCRTC_KEY_FILE: "${OLCRTC_KEY_FILE:-/var/lib/olcrtc/key.hex}"
OLCRTC_DNS: "${OLCRTC_DNS:-1.1.1.1:53}"
OLCRTC_DNS: "${OLCRTC_DNS:-8.8.8.8:53}"
OLCRTC_SOCKS_PROXY: "${OLCRTC_SOCKS_PROXY:-}"
OLCRTC_SOCKS_PROXY_PORT: "${OLCRTC_SOCKS_PROXY_PORT:-1080}"
OLCRTC_VIDEO_W: "${OLCRTC_VIDEO_W:-0}"

View File

@@ -117,12 +117,12 @@ mode: srv
auth:
provider: jitsi
room:
id: "https://meet.small-dm.ru/myroom"
id: "https://meet.small-dm.ru/REPLACE_ME_WITH_ROOM_ID"
crypto:
key: "REPLACE_ME_WITH_64_HEX_CHARS"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
data: data
```
@@ -133,12 +133,12 @@ mode: cnc
auth:
provider: jitsi
room:
id: "https://meet.small-dm.ru/myroom"
id: "https://meet.small-dm.ru/REPLACE_ME_WITH_ROOM_ID"
crypto:
key: "REPLACE_ME_WITH_64_HEX_CHARS"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -215,7 +215,7 @@ srv := tunnel.New(tunnel.Config{
Carrier: "jitsi",
RoomURL: "https://meet.small-dm.ru/myroom",
KeyHex: "<64-char hex>",
DNSServer: "1.1.1.1:53",
DNSServer: "8.8.8.8:53",
})
err := srv.Run(ctx)
```

View File

@@ -85,7 +85,7 @@ crypto:
key: "REPLACE_ME_WITH_64_HEX_CHARS"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
data: data
```
@@ -101,7 +101,7 @@ crypto:
key: "REPLACE_ME_WITH_64_HEX_CHARS"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -154,7 +154,7 @@ mode: srv
crypto:
key_file: ./olcrtc.key
net:
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
data: data
profiles:

View File

@@ -7,7 +7,7 @@ crypto:
key_file: "./olcrtc.key"
net:
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
liveness:
interval: 10s

View File

@@ -162,7 +162,7 @@ crypto:
key: "d823fa01cb3e0609b67322f7cf984c4ee2e4ce2e294936fc24ef38c9e59f4799"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
data: data
```
@@ -193,7 +193,7 @@ crypto:
key: "d823fa01cb3e0609b67322f7cf984c4ee2e4ce2e294936fc24ef38c9e59f4799"
net:
transport: vp8channel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
data: data
```
@@ -236,7 +236,7 @@ crypto:
key: "<hex-key-такой-же-как-на-сервере>"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -262,7 +262,7 @@ crypto:
key: "<hex-key>"
net:
transport: vp8channel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -292,7 +292,7 @@ crypto:
key: "<hex-key>"
net:
transport: vp8channel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808

View File

@@ -48,7 +48,7 @@
| `room.id` | Room ID |
| `crypto.key` или `crypto.key_file` | Ключ шифрования hex 64 символа. Генерация: `openssl rand -hex 32` |
| `data` | Всегда `data` |
| `net.dns` | DNS-сервер, например `1.1.1.1:53` |
| `net.dns` | DNS-сервер, например `8.8.8.8:53` |
---
@@ -201,7 +201,7 @@ crypto:
key: "<hex-key>"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
data: data
```
@@ -216,7 +216,7 @@ crypto:
key: "<hex-key>"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -236,7 +236,7 @@ crypto:
key: "<hex-key>"
net:
transport: datachannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -267,7 +267,7 @@ crypto:
key: "<hex-key>"
net:
transport: vp8channel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
vp8:
fps: 60
batch_size: 64
@@ -285,7 +285,7 @@ crypto:
key: "<hex-key>"
net:
transport: vp8channel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -310,7 +310,7 @@ crypto:
key: "<hex-key>"
net:
transport: seichannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
sei:
fps: 60
batch_size: 64
@@ -330,7 +330,7 @@ crypto:
key: "<hex-key>"
net:
transport: seichannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808
@@ -355,7 +355,7 @@ crypto:
key: "<hex-key>"
net:
transport: videochannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
video:
codec: qrcode
width: 1080
@@ -377,7 +377,7 @@ crypto:
key: "<hex-key>"
net:
transport: videochannel
dns: "1.1.1.1:53"
dns: "8.8.8.8:53"
socks:
host: "127.0.0.1"
port: 8808

View File

@@ -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)

View File

@@ -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 ||

View File

@@ -52,7 +52,7 @@ var (
const (
defaultTransport = "vp8channel"
dataTransport = "datachannel"
defaultDNSServer = "1.1.1.1:53"
defaultDNSServer = "8.8.8.8:53"
defaultHTTPPingURL = "https://www.google.com/generate_204"
carrierWBStream = "wbstream"
)

View File

@@ -67,7 +67,7 @@ type Config struct {
// --- common ---
// Name is the display name used when joining the room.
Name string
// DNSServer is an optional custom DNS resolver (e.g. "1.1.1.1:53").
// DNSServer is an optional custom DNS resolver (e.g. "8.8.8.8:53").
DNSServer string
// ProxyAddr / ProxyPort configure an outbound SOCKS5 proxy.
ProxyAddr string

View File

@@ -9,7 +9,7 @@
// Carrier: "jitsi",
// RoomURL: "https://meet.small-dm.ru/myroom",
// KeyHex: "<64-char hex>",
// DNSServer: "1.1.1.1:53",
// DNSServer: "8.8.8.8:53",
// AuthHook: func(deviceID string, claims map[string]any) (string, error) {
// // reject unknown devices, enrich session with a DB-issued ID
// return db.IssueSession(deviceID, claims)
@@ -82,7 +82,7 @@ type Config struct {
// --- crypto & networking ---
KeyHex string // 64-char hex (32 bytes) shared with the client
DNSServer string // resolver used for target dials, e.g. "1.1.1.1:53"
DNSServer string // resolver used for target dials, e.g. "8.8.8.8:53"
SOCKSProxyAddr string // optional outbound SOCKS5 proxy host
SOCKSProxyPort int // optional outbound SOCKS5 proxy port

View File

@@ -16,7 +16,7 @@ func TestRun_FailsWithoutKey(t *testing.T) {
Transport: "datachannel",
Carrier: "telemost",
RoomURL: "room-1",
DNSServer: "1.1.1.1:53",
DNSServer: "8.8.8.8:53",
}).Run(context.Background())
if err == nil {
t.Fatal("Run(no key) error = nil")

View File

@@ -19,7 +19,7 @@ room_id="${OLCRTC_ROOM_ID:-}"
carrier="${OLCRTC_CARRIER:-${OLCRTC_AUTH:-}}"
transport="${OLCRTC_TRANSPORT:-}"
data_dir="${OLCRTC_DATA_DIR:-/usr/share/olcrtc}"
dns_server="${OLCRTC_DNS:-1.1.1.1:53}"
dns_server="${OLCRTC_DNS:-8.8.8.8:53}"
key="${OLCRTC_KEY:-}"
key_file="${OLCRTC_KEY_FILE:-/var/lib/olcrtc/key.hex}"
socks_proxy="${OLCRTC_SOCKS_PROXY:-}"