From 782e27d545ba32544af751e4cbf6c8df329c64f2 Mon Sep 17 00:00:00 2001 From: dd dd Date: Fri, 2 Aug 2024 01:17:12 +0200 Subject: [PATCH] Add PublicAddressBind config and update TCP listener usage --- config/config.go | 5 +++-- socks5/socks5.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 7c247dd..cc9cec1 100644 --- a/config/config.go +++ b/config/config.go @@ -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 { diff --git a/socks5/socks5.go b/socks5/socks5.go index dca76a0..2667481 100644 --- a/socks5/socks5.go +++ b/socks5/socks5.go @@ -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 }