mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-10 19:17:25 +02:00
integration: add ConnectToNetwork and peer relay ping support
Add ConnectToNetwork to TailscaleClient interface and TailscaleInContainer, matching the existing pattern on HeadscaleInContainer and DERPServerInContainer. This enables dual-homing Tailscale containers to additional Docker networks after creation. Also accept "via relay" in the Ping helper's non-direct mode, alongside "via DERP". Peer relay pings output "via peer-relay(...)" which was previously rejected as errTailscalePingNotDERP. Updates #2180
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/juanfont/headscale/hscontrol/util"
|
||||
"github.com/juanfont/headscale/integration/dockertestutil"
|
||||
"github.com/juanfont/headscale/integration/tsic"
|
||||
"github.com/ory/dockertest/v3"
|
||||
"tailscale.com/ipn/ipnstate"
|
||||
"tailscale.com/net/netcheck"
|
||||
"tailscale.com/types/key"
|
||||
@@ -56,6 +57,7 @@ type TailscaleClient interface {
|
||||
MustID() types.NodeID
|
||||
ReadFile(path string) ([]byte, error)
|
||||
PacketFilter() ([]filter.Match, error)
|
||||
ConnectToNetwork(network *dockertest.Network) error
|
||||
|
||||
// FailingPeersAsString returns a formatted-ish multi-line-string of peers in the client
|
||||
// and a bool indicating if the clients online count and peer count is equal.
|
||||
|
||||
Reference in New Issue
Block a user