mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-29 06:26:31 +00:00
cmd/lopower: wire up --wg-port flag
Change-Id: I406cf97c4af27c2ac4b4fe28eb8a3b30fac37e5b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Anton Tolchanov
parent
507c359a44
commit
0f881a9d09
@@ -39,7 +39,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wgListenAddr = flag.String("wg-listen", ":51820", "address to listen on for WireGuard from the client")
|
wgListenPort = flag.Int("wg-port", 51820, "port number to listen on for WireGuard from the client")
|
||||||
qrListenAddr = flag.String("qr-listen", "127.0.0.1:8014", "HTTP address to serve a QR code for client's WireGuard configuration")
|
qrListenAddr = flag.String("qr-listen", "127.0.0.1:8014", "HTTP address to serve a QR code for client's WireGuard configuration")
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -106,6 +106,7 @@ func (lp *lpServer) reconfig() {
|
|||||||
wc := &wgcfg.Config{
|
wc := &wgcfg.Config{
|
||||||
Name: "lopower0",
|
Name: "lopower0",
|
||||||
PrivateKey: lp.c.PrivKey,
|
PrivateKey: lp.c.PrivKey,
|
||||||
|
ListenPort: uint16(*wgListenPort),
|
||||||
Addresses: []netip.Prefix{
|
Addresses: []netip.Prefix{
|
||||||
netip.PrefixFrom(lp.c.V4, 32),
|
netip.PrefixFrom(lp.c.V4, 32),
|
||||||
netip.PrefixFrom(lp.c.V6, 128),
|
netip.PrefixFrom(lp.c.V6, 128),
|
||||||
|
|||||||
Reference in New Issue
Block a user