mirror of
https://github.com/asmogo/nws.git
synced 2025-01-18 10:01:33 +00:00
Add PublicAddressBind config and update TCP listener usage
This commit is contained in:
parent
16277358fe
commit
782e27d545
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user