Add PublicAddressBind config and update TCP listener usage

This commit is contained in:
dd dd 2024-08-02 01:17:12 +02:00
parent 16277358fe
commit 782e27d545
2 changed files with 4 additions and 3 deletions

View File

@ -10,8 +10,9 @@ import (
)
type EntryConfig struct {
NostrRelays []string `env:"NOSTR_RELAYS" envSeparator:";"`
PublicAddress string `env:"PUBLIC_ADDRESS"`
NostrRelays []string `env:"NOSTR_RELAYS" envSeparator:";"`
PublicAddress string `env:"PUBLIC_ADDRESS"`
PublicAddressBind string `env:"PUBLIC_ADDRESS_BIND"`
}
type ExitConfig struct {

View File

@ -99,7 +99,7 @@ func New(conf *Config, pool *nostr.SimplePool, config *config.EntryConfig) (*Ser
pool: pool,
}
if conf.entryConfig.PublicAddress != "" {
listener, err := NewTCPListener(conf.entryConfig.PublicAddress)
listener, err := NewTCPListener(conf.entryConfig.PublicAddressBind)
if err != nil {
return nil, err
}