|
|
@@ -34,18 +34,16 @@ type accessResponseURLs struct {
|
|
34
|
34
|
}
|
|
35
|
35
|
|
|
36
|
36
|
type Access struct {
|
|
37
|
|
- base `kong:"-"`
|
|
|
37
|
+ base
|
|
38
|
38
|
|
|
39
|
39
|
PublicIPv4 net.IP `kong:"help='Public IPv4 address for proxy. By default it is resolved via remote website',name='ipv4',short='i'"` // nolint: lll
|
|
40
|
40
|
PublicIPv6 net.IP `kong:"help='Public IPv6 address for proxy. By default it is resolved via remote website',name='ipv6',short='I'"` // nolint: lll
|
|
41
|
41
|
Port uint `kong:"help='Port number. Default port is taken from configuration file, bind-to parameter',type:'uint',short='p'"` // nolint: lll
|
|
42
|
42
|
Hex bool `kong:"help='Print secret in hex encoding.',short='x'"`
|
|
43
|
|
-
|
|
44
|
|
- ConfigPath string `kong:"arg,required,type='existingfile',help='Path to the configuration file.',name='config-path'"` // nolint: lll
|
|
45
|
43
|
}
|
|
46
|
44
|
|
|
47
|
45
|
func (c *Access) Run(cli *CLI, version string) error {
|
|
48
|
|
- if err := c.ReadConfig(cli.Access.ConfigPath, version); err != nil {
|
|
|
46
|
+ if err := c.ReadConfig(version); err != nil {
|
|
49
|
47
|
return fmt.Errorf("cannot init config: %w", err)
|
|
50
|
48
|
}
|
|
51
|
49
|
|