Skip to content

Commit e58fba8

Browse files
authored
Merge pull request #24 from ajpauwels/add-ipv6-support
fix: adds support for ipv6 addresses
2 parents 5bc6a90 + 4500015 commit e58fba8

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ listen: 0.0.0.0:8080
4646
listen_pprof: 0.0.0.0:7008
4747
# Where to send the modified requests (Cortex)
4848
target: http://127.0.0.1:9091/receive
49+
# Whether to enable querying for IPv6 records
50+
enable_ipv6: false
4951

5052
# Authentication
5153
auth:

config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ type config struct {
1414
Listen string
1515
ListenPprof string `yaml:"listen_pprof"`
1616

17-
Target string
17+
Target string
18+
EnableIPv6 bool `yaml:"enable_ipv6"`
1819

1920
LogLevel string `yaml:"log_level"`
2021
Timeout time.Duration

config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ listen: 0.0.0.0:8080
22
listen_pprof: 0.0.0.0:7008
33

44
target: http://127.0.0.1:9091/receive
5+
enable_ipv6: false
56

67
auth:
78
egress:

processor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ func newProcessor(c config) *processor {
6565
WriteTimeout: c.Timeout,
6666
MaxConnWaitTimeout: 1 * time.Second,
6767
MaxConnsPerHost: 64,
68+
DialDualStack: c.EnableIPv6,
6869
}
6970

7071
if c.Auth.Egress.Username != "" {

0 commit comments

Comments
 (0)