add TorrentAddr cmd option

This commit is contained in:
nikk gitanes
2022-05-25 14:28:32 +03:00
parent 266fe0637f
commit 5800c01cb0
3 changed files with 25 additions and 15 deletions

View File

@@ -32,6 +32,7 @@ type args struct {
DontKill bool `arg:"-k" help:"don't kill server on signal"`
UI bool `arg:"-u" help:"open torrserver page in browser"`
TorrentsDir string `arg:"-t" help:"autoload torrents from dir"`
TorrentAddr string `default:":32000" help:"Torrent client address"`
PubIPv4 string `arg:"-4" help:"set public IPv4 addr"`
PubIPv6 string `arg:"-6" help:"set public IPv6 addr"`
}
@@ -74,6 +75,10 @@ func main() {
}()
}
if params.TorrentAddr != "" {
settings.TorAddr = params.TorrentAddr
}
if params.PubIPv4 != "" {
settings.PubIPv4 = params.PubIPv4
}