Skip to content

Commit 064bcd2

Browse files
terminal: add tlsextraip & tlsextradomain to conf
This commit adds the `tlsextraip` and `tlsextradomain` config fields to the LiT config. This allows users to specify additional IPs and domains to be included in the TLS certificate.
1 parent 6fb3203 commit 064bcd2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

config.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ type Config struct {
161161
LetsEncryptDir string `long:"letsencryptdir" description:"The directory where the Let's Encrypt library will store its key and certificate."`
162162
LetsEncryptListen string `long:"letsencryptlisten" description:"The IP:port on which LiT will listen for Let's Encrypt challenges. Let's Encrypt will always try to contact on port 80. Often non-root processes are not allowed to bind to ports lower than 1024. This configuration option allows a different port to be used, but must be used in combination with port forwarding from port 80. This configuration can also be used to specify another IP address to listen on, for example an IPv6 address."`
163163

164-
TLSCertPath string `long:"tlscertpath" description:"Path to write the self signed TLS certificate for LiT's RPC and REST proxy service (if Let's Encrypt is not used). This only applies to the HTTPSListen port."`
165-
TLSKeyPath string `long:"tlskeypath" description:"Path to write the self signed TLS private key for LiT's RPC and REST proxy service (if Let's Encrypt is not used). This only applies to the HTTPSListen port."`
164+
TLSCertPath string `long:"tlscertpath" description:"Path to write the self signed TLS certificate for LiT's RPC and REST proxy service (if Let's Encrypt is not used). This only applies to the HTTPSListen port."`
165+
TLSKeyPath string `long:"tlskeypath" description:"Path to write the self signed TLS private key for LiT's RPC and REST proxy service (if Let's Encrypt is not used). This only applies to the HTTPSListen port."`
166+
TLSExtraIPs []string `long:"tlsextraip" description:"Adds an extra ip to the generated LiT TLS certificate (if Let's Encrypt is not used)"`
167+
TLSExtraDomains []string `long:"tlsextradomain" description:"Adds an extra domain to the generated LiT TLS certificate (if Let's Encrypt is not used)"`
166168

167169
LitDir string `long:"lit-dir" description:"The main directory where LiT looks for its configuration file. If LiT is running in 'remote' lnd mode, this is also the directory where the TLS certificates and log files are stored by default."`
168170
ConfigFile string `long:"configfile" description:"Path to LiT's configuration file."`
@@ -831,7 +833,8 @@ func buildTLSConfigForHttp2(config *Config) (*tls.Config, error) {
831833
!lnrpc.FileExists(tlsKeyPath) {
832834

833835
certBytes, keyBytes, err := cert.GenCertPair(
834-
defaultSelfSignedCertOrganization, nil, nil,
836+
defaultSelfSignedCertOrganization,
837+
config.TLSExtraIPs, config.TLSExtraDomains,
835838
false, DefaultAutogenValidity,
836839
)
837840
if err != nil {

0 commit comments

Comments
 (0)