|
|
@@ -18,6 +18,7 @@ type SimpleRun struct {
|
|
18
|
18
|
TCPBuffer string `kong:"name='tcp-buffer',short='b',default='4KB',help='Deprecated and ignored'"` //nolint: lll
|
|
19
|
19
|
PreferIP string `kong:"name='prefer-ip',short='i',default='prefer-ipv6',help='IP preference. By default we prefer IPv6 with fallback to IPv4.'"` //nolint: lll
|
|
20
|
20
|
DomainFrontingPort uint64 `kong:"name='domain-fronting-port',short='p',default='443',help='A port to access for domain fronting.'"` //nolint: lll
|
|
|
21
|
+ DomainFrontingIP string `kong:"name='domain-fronting-ip',help='An IP address to use for domain fronting instead of resolving the hostname via DNS.'"` //nolint: lll
|
|
21
|
22
|
DOHIP net.IP `kong:"name='doh-ip',short='n',default='1.1.1.1',help='IP address of DNS-over-HTTP to use.'"` //nolint: lll
|
|
22
|
23
|
Timeout time.Duration `kong:"name='timeout',short='t',default='10s',help='Network timeout to use'"` //nolint: lll
|
|
23
|
24
|
Socks5Proxies []string `kong:"name='socks5-proxy',short='s',help='Socks5 proxies to use for network access.'"` //nolint: lll
|
|
|
@@ -47,6 +48,12 @@ func (s *SimpleRun) Run(cli *CLI, version string) error { //nolint: cyclop,funle
|
|
47
|
48
|
return fmt.Errorf("incorrect domain-fronting-port: %w", err)
|
|
48
|
49
|
}
|
|
49
|
50
|
|
|
|
51
|
+ if s.DomainFrontingIP != "" {
|
|
|
52
|
+ if err := conf.DomainFrontingIP.Set(s.DomainFrontingIP); err != nil {
|
|
|
53
|
+ return fmt.Errorf("incorrect domain-fronting-ip: %w", err)
|
|
|
54
|
+ }
|
|
|
55
|
+ }
|
|
|
56
|
+
|
|
50
|
57
|
if err := conf.Network.DOHIP.Set(s.DOHIP.String()); err != nil {
|
|
51
|
58
|
return fmt.Errorf("incorrect doh-ip: %w", err)
|
|
52
|
59
|
}
|